X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/52635808ae22d26ce0d4a7636b3b737b0a2dba1e..227dac53cfca24e57a9c96b78c0b7581b3df961d:/ugw/data/preprocess.m diff --git a/ugw/data/preprocess.m b/ugw/data/preprocess.m index 6e7b981..bd6f768 100755 --- a/ugw/data/preprocess.m +++ b/ugw/data/preprocess.m @@ -2,19 +2,38 @@ ## -*-octave-*- datafiles = argv(); +datafiles = { + "rtems.dat" + "kernel.dat" + "mmapbusy-mmap.dat" + "mmapbusy-write.dat" + "readnb-write.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) + 2); 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)'; + avg = mean(x); + mat = [ mat; q lost avg ]; 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, ' ', '"');