summaryrefslogtreecommitdiff
path: root/lib/data_parameters.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-03 16:33:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-03 16:33:26 +0200
commit71b54b103f8290377a6a5afe5c32edf9cdae9240 (patch)
tree13edf1e65e0c781e2e298558765e75ef6d1ee373 /lib/data_parameters.py
parent647f46102873af704a84826620698ad4e9be127e (diff)
add pre-processed callcycles (one median value per function call to avoid outliers)
Diffstat (limited to 'lib/data_parameters.py')
-rw-r--r--lib/data_parameters.py7
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')],