Add duration formatter for numeric data#8136
Merged
mistercrunch merged 2 commits intoapache:masterfrom Aug 30, 2019
villebro:duration
Merged
Add duration formatter for numeric data#8136mistercrunch merged 2 commits intoapache:masterfrom villebro:duration
mistercrunch merged 2 commits intoapache:masterfrom
villebro:duration
Conversation
kristw
approved these changes
Aug 28, 2019
Member
Author
|
Removed second and minute formatters, as putting a constant multiplier to convert from min/sec to ms in a metric is trivial. Also added separate option for showing sub-second durations. |
Codecov Report
@@ Coverage Diff @@
## master #8136 +/- ##
=======================================
Coverage 65.96% 65.96%
=======================================
Files 486 486
Lines 23030 23030
Branches 2541 2541
=======================================
Hits 15192 15192
Misses 7704 7704
Partials 134 134
Continue to review full report at Codecov.
|
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CATEGORY
Choose one
SUMMARY
This PR adds a number formatter based on pretty-ms for formatting time durations that was added to
superset-uiin version0.12.1(apache-superset/superset-ui#209). The following formatters are available:DURATION: 66000 => 1m 6s, 66111 => 1m 6.1s (rounded to 1 decimal point)DURATION_SUB: 66100.40008 => 1m 6s 100ms 400µs 80ns, 100.40008 => 100ms 400µs 80nsSCREENSHOT
TEST PLAN
Tested locally
REVIEWERS
@etr2460 @kristw @mistercrunch