Commit 66281a29 authored by Stefan Reif's avatar Stefan Reif

Fix NAN correlation values

Really short regions confuse the correlation computations because the
duration is always zero. In this case, we assign the correlation value 0
because such a short duration is not latency-critical at all.
parent 450bb8e7
......@@ -175,7 +175,10 @@ def analyse(df, config):
l3 = []
for i in range(len(l1)):
l3 += [_get_timestamp(df,event2,i) - _get_timestamp(df,event1,i)]
correlation = pearsonr(l3, e2e)[0]
if any(map(lambda x: x != 0, l3)):
correlation = pearsonr(l3, e2e)[0]
correlation = 0
hdb += [{'Start':str(event1), 'End':str(event2), 'Correlation':correlation}]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment