brimdata / zui

Zui is a powerful desktop application for exploring and working with data. The official front-end to the Zed lake.
https://www.brimdata.io/download/
Other
1.8k stars 132 forks source link

Tiny duration shown as "Not available" in correlations view #3101

Closed philrz closed 3 months ago

philrz commented 4 months ago

Repro is with Zui commit b4ed51d.

The attached test data conn.log.gz contains two Zeek conn records. As shown in the attached video, when the duration value is large, the "Duration" line printed below the correlations view shows an accurate approximation of the the value (specifically, 21 minutes 9 seconds whereas the full-precision original value was 21m9.512465s). However, for the other record where the original value is 1us, the value shown below the correlations view is Not available, which is incorrect.

https://github.com/brimdata/zed/assets/5934157/6db713ab-4dfc-46f3-8d7d-81bd21320a4f

I poked through the code and I see the math that's triggering the problem, but I'm not certain yet of the best fix.

philrz commented 3 months ago

Verified in Zui commit 6a90407.

As shown in the attached video, now when the conn record with 1us duration is clicked, the text below the correlation accurately says "less than 1 millisecond" rather than the prior "Not available". Also, as noted in the linked PR #3119, the change also now shows durations in the range less than 1 second in whole milliseconds rather than as a fraction of seconds, and this is also shown.

https://github.com/brimdata/zui/assets/5934157/1994bb4d-8741-4f46-9488-0d094a201235

Thanks @jameskerr!