Page MenuHomePhabricator

formatElapsedTime proposal for <10s
ClosedPublic

Authored by dish on Jan 7 2021, 9:45 PM.

Details

Summary

This diff proposes that we show msec-level granularity in formatElapsedTime if the value is less than 10 seconds. Why? Currently:

  • If the value is less than 1 second, we show milliseconds, e.g. 425ms. This seems fine.
  • Otherwise, we show hh:mm:ss. This is not great when we're only looking 1-10 seconds, e.g. 00:00:02. Millisecond-level granularity is likely to be useful here.

In this change:

  • If the elapsed time is less than ten seconds, render a seconds-level value with milliseconds, e.g. 0.425s, 4.887s, etc.
  • Otherwise, continue using the hh:mm:ss format: 00:00:32, 00:02:38, etc.
Test Plan

View Runs table, verify changes described above.

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.