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

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)]
                if any(map(lambda x: x != 0, l3)):
                    correlation = pearsonr(l3, e2e)[0]
                else:
                    correlation = 0

                hdb += [{'Start':str(event1), 'End':str(event2), 'Correlation':correlation}]