diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-04-03 16:33:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-04-03 16:33:26 +0200 |
commit | 71b54b103f8290377a6a5afe5c32edf9cdae9240 (patch) | |
tree | 13edf1e65e0c781e2e298558765e75ef6d1ee373 | |
parent | 647f46102873af704a84826620698ad4e9be127e (diff) |
add pre-processed callcycles (one median value per function call to avoid outliers)
-rw-r--r-- | lib/data_parameters.py | 7 |
1 files changed, 7 insertions, 0 deletions
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')], |