Skip to content

Console formatting for duration #709

Open
@mitar

Description

@mitar

Console output is meant to be human-readable, but durations are shown as floats (e.g., in seconds or milliseconds) which is far from human-readable for non-simple durations. I know that the issue is that console output is interpreting data in JSON, and in JSON the fact that a field was a duration is lost, is just a number, but I still think some solution to this should be provided.

One way would be to use FormatFieldValue but sadly it does not get field name as a parameter, so one cannot hard-code it to (known/used) duration field names to convert float to formatted duration string.

Maybe DurationFields could get a list of duration field names?

Currently, it looks that the only workaround is to use FormatPrepare which can do some preprocessing based on (known/used) field names.

Any other suggestion how to tackle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions