From 71b54b103f8290377a6a5afe5c32edf9cdae9240 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 3 Apr 2019 16:33:26 +0200 Subject: add pre-processed callcycles (one median value per function call to avoid outliers) --- lib/data_parameters.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/data_parameters.py b/lib/data_parameters.py index 9a6429f..9b5a875 100644 --- a/lib/data_parameters.py +++ b/lib/data_parameters.py @@ -134,12 +134,19 @@ class Protolog: # should be identical. return max(0, int(np.median(data[key][1:]) - np.median(data['nop'][1:]))) + def _median_callcycles(data): + ret = dict() + for line in data.keys(): + ret[line] = np.median(data[line]) + return ret + idem = lambda x: x datamap = [ ['bss_nop', 'bss_size_nop', idem], ['bss_ser', 'bss_size_ser', idem], ['bss_serdes', 'bss_size_serdes', idem], ['callcycles_raw', 'callcycles', idem], + ['callcycles_median', 'callcycles', _median_callcycles], ['cycles_ser', 'cycles', lambda x: Protolog._median_cycles(x, 'ser')], ['cycles_des', 'cycles', lambda x: Protolog._median_cycles(x, 'des')], ['cycles_enc', 'cycles', lambda x: Protolog._median_cycles(x, 'enc')], -- cgit v1.2.3