octant
octant copied to clipboard
add a component.NewDuration(time.Duration)
it would be great to be able to add a duration column to a table. e.g. to visualise the duration of a pipeline / job.
So something like the component.NewTimestamp(time.Time)
would be great: component.NewDuration(time.Duration)
actually I found a workaround by just converting the duration into a relative time from now...
func NewDuration(d time.Duration) component.Component {
t := time.Now().Add(d * -1)
return component.NewTimestamp(t)
}
Wonder if its worth adding this helper function to octant?
I think this is a great candidate for some documentation. We'll think about adding it as a helper as well.
I think It'd be very helpful to have this as a helper, also, doc about it is needed, I can do it
Want to consider where a helper like this would live, how it would be documented, and tested. Any helper we expose now becomes part of our API that users expect.
This was my motivation for merely documenting it vs. provided a concrete implementation.