X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/74ba02c90964e3254c504cb5defb820eef2dfde1..a544bd581ecdcde2a3b450b683f910ec0565e2b9:/ugw/data/preprocess.m diff --git a/ugw/data/preprocess.m b/ugw/data/preprocess.m index 6e7b981..0aee1c8 100755 --- a/ugw/data/preprocess.m +++ b/ugw/data/preprocess.m @@ -2,19 +2,37 @@ ## -*-octave-*- datafiles = argv(); +datafiles = { + "rtems.dat" + "kernel.dat" + "readnb-write.dat" + "mmapbusy-write.dat" + "mmapbusy-mmap.dat" + "readbusy-write.dat" + "read-write.dat" + "mmap-write.dat" + "mmap-mmap.dat" +}; + quantiles = [0 0.5 0.90 0.99]; -mat = zeros(0, length(quantiles)); +mat = zeros(0, length(quantiles) + 1); names = {}; for i=1:length(argv), + [d, n, e, v] = fileparts(datafiles{i}); x = load(datafiles{i})*1e6; + stat = csv2cell([n, "-stat.txt"], '='); + lost = stat{6,2}; q = quantile (x, quantiles); - mat = [ mat; q' ]; - [d, n, e, v] = fileparts(datafiles{i}); + q = max(q, 0)'; + mat = [ mat; q lost ]; names{i} = n; end -[mat, ind] = sortrows(mat, 2); -result = [names(ind)', num2cell(mat)]; +if 0, + [mat, ind] = sortrows(mat, 2); + names = names(ind) +end +result = [names', num2cell(mat)]; cell2csv("result", result, ' ', '"');