Repository navigation
display task duration on finished tasks - #3579
Conversation
|
Yes! thanks @mockersf |
vito
left a comment
There was a problem hiding this comment.
😍 This is excellent, thanks for the PR (and tests!)!
I think it could use some UI polish - we don't often use character notation ([]) and I'm not sure it'll be immediately obvious what the "10s" is without something saying 'duration' or 'took' or something.
@marco-m also brought up a good point that this is valuable information to show for get and put steps, too, but that space in the UI is currently taken up by the resource version for those steps. @Lindsayauchin when you have time, this could be a good 'design snack' (show duration for each step, not just tasks).
For now I'm happy to merge as-is if you want to leave the rest to us. 🙂 I'm fine with shipping this and iterating on the design later as it's definitely useful to have. I'll leave it open for a bit in case you want to play with the design some more, but 👍 from me.
|
I went with @marco-m proposition in #1788 for
I'm open to suggestion too 😃 For resource duration, I tried to see if it was the same kind of change but it seems events for resource ends ( |
|
Ah, shame we don't include timestamps for those events. Would you be interested in adding that? I actually think it wouldn't be too hard; we'd just need to add the field to the concourse/atc/engine/put_delegate.go Lines 32 to 37 in 90a604c ...just like we do for tasks here: concourse/atc/engine/task_delegate.go Lines 61 to 73 in 90a604c re: where to put the timestamp, it does seem like the UI is a bit cramped. The easiest way to layer it in would maybe be as a tooltip on the step's icon (the checkmark/X on the right). The disadvantage would be that you'd have to mouse-over to reveal the duration. Would that be OK? It would at least de-clutter the UI when you don't actually care, but it could also make it hard for slowness to 'jump out'. |
|
@vito FYI in #1788, @Lindsayauchin added a thumbs up to the proposal of the |
|
Proposing a design similar to issue #1788 that fits nicely into the current UI. |
|
@Lindsayauchin that wouldn't work when also displaying durations for resources. With |
|
@vito I added duration for resources
|
|
@mockersf Nifty, I hadn't thought of timing breakdowns but that seems useful, especially when a significant chunk goes just to initialization. I wonder if there's any other useful info to put there in the future. 🤔 @marco-m @Lindsayauchin Wdyt of the tooltip UI/UX? |
I'm so excited for this change. In the data I scrape it's a noticeable hole. Related wish: regardless of how it's presented in the UI, please give finer-grained timestamps in the events streamed from the API. To many things can happen in a 1-second window, especially if caching makes various events "instant". I'd ask for at least milliseconds, but I'd be happiest with nanoseconds (Golang's internal granularity).
Everything. Please. Everything. |
Adding a more precise time in the event shouldn't be complicated, but there's an issue with format and backward compatibility:
what do you think ? |
I prefer clock time elapsed since epoch. RFC3339 timestamps are calendar time, not clock time: they require external information for correct interpretation (timezones, daylight savings, leap seconds etc). Clock time ignores these additional constructs. A thousand years from now the nanoseconds elapsed from epoch until the time a stamp was taken will have exactly the same value. But calendars change all the time, a record kept as a calendrical timestamp is subject to unexpected -- and hard-to-detect -- corruption due to factors outside the record. For example, the dates 3rd to the 13th of September, 1752, never happened in the British Empire. They were skipped due to a change from the Julian to Gregorian calender. If I had recorded a timestamp at the time (say 4th Sept 1752), it would become meaningless without additional processing. But if I had an epoch stamp (supposing nanoseconds since 1700, say), I would still have a universally reliable concept of when the event happened. Both ways of expressing points in time are affected by clock drift, clock accuracy, clock precision and relativistic effects. As for the format, I'd prefer an |
|
I switched the According to Golang's doc, it will start failing in 2263 |
vito
left a comment
There was a problem hiding this comment.
The nanosecond change kind of explodes the complexity/risk of this, but if you're willing to follow through with the changes necessary, then I'm cool with it. 👍
@jchesterpivotal Can you provide more details on why such high precision is important to you? I get that a lot can happen in a second, but transitioning to nanoseconds is nontrivial, and it's not like we're taking these measurements in a vacuum. There are a lot of moving parts behind a running build (including network calls to the database), and at the subsecond level it seems likely you'd get a whole lot of noise rather than a more precise signal. 🤔
| tag := build.TeamName() + "/" + build.PipelineName() + "/" + build.JobName() + "/" + build.Name() + "/" + string(log.Origin.ID) | ||
|
|
||
| err = syslog.Write(d.hostname, tag, time.Unix(log.Time, 0), payload) | ||
| err = syslog.Write(d.hostname, tag, time.Unix(log.Time / 1000000000, int64(math.Remainder(float64(log.Time), 1000000000)) ), payload) |
There was a problem hiding this comment.
I think this can be slightly cleaned up like so:
| err = syslog.Write(d.hostname, tag, time.Unix(log.Time / 1000000000, int64(math.Remainder(float64(log.Time), 1000000000)) ), payload) | |
| err = syslog.Write(d.hostname, tag, time.Unix(log.Time / time.Second, log.Time % time.Second), payload) |
| >> Query.children [] | ||
| >> Query.index -1 | ||
| >> Query.has [ text "v3.1.4" ] | ||
| , test "finist task lists initialization duration in tooltip" <| |
There was a problem hiding this comment.
| , test "finist task lists initialization duration in tooltip" <| | |
| , test "finish task lists initialization duration in tooltip" <| |
| >> Query.findAll [ tag "tr" ] | ||
| >> Query.index 0 | ||
| >> Query.has [ text "initialization", text "10s" ] | ||
| , test "finist task lists step duration in tooltip" <| |
There was a problem hiding this comment.
| , test "finist task lists step duration in tooltip" <| | |
| , test "finish task lists step duration in tooltip" <| |
|
|
||
| func (FinishTask) EventType() atc.EventType { return EventTypeFinishTask } | ||
| func (FinishTask) Version() atc.EventVersion { return "4.0" } | ||
| func (FinishTask) Version() atc.EventVersion { return "5.0" } |
There was a problem hiding this comment.
deprecated_events.go so that clients can still handle the old event type (e.g. when doing a fly watch on an older build). The old event should then be registered here.
fly will have to be changed to handle nanosecond-precision timestamps here. It should probably handle old and new event types and 'normalize' the old ones so nanoseconds or something.
fly will have to be updated to handle LogV51, just like it handles LogV50 now. Same for all the other bumped events.
Sorry this is such a pain. I'd like to get away from this event-based system in the future - possibly as part of #3521.
Partly because of the limits of PostgreSQL interval types, which behave badly in interval queries when they are "empty". Nanoseconds are the finest granularity I can ever expect to get in my lifetime and it's highly unlikely that two events will ever collide. Right now millisecond resolution will probably avoid problems most of the time, but I will still need special cases because a lot of the time loading from the cache will be sub-millisecond due to file page caching. Microseconds are probably going to be enough for some time, but if you're going as far as microseconds ... |
+1 |
|
I accept noise that will reduce the accuracy of my figures, but precision is still useful for me, because I need sufficient precision to create a reliable ordering of events with a lifetime > 0. |
I see - so having the higher precision allows you to determine the order of events in close timing situations? Could you use the event ID instead? That's ultimately what determines the order of events from Concourse's perspective. |
I miss out on the interval querying, which is super useful to me. If I have time intervals I can ask questions like "how many builds were active during [arbitrary window of time]?" But PostgreSQL, at least for version 9.6, interprets |
As there are more changes than what I did, I think it would be better to split the PR and keep this one just to display duration of steps in the UI, and then I could continue on moving to nanoseconds in another PR. if you agree I'll remove the change to nanoseconds from this one and start another |
Yes, I think so. I somewhat derailed the original purpose. Sorry :| |
|
@mockersf @jchesterpivotal Sounds good. Happy to discuss nanosecond precision stuff in another PR. 👍 |
|
@vito done, everything is back to seconds 🦊 |
Signed-off-by: François Mockers <[email protected]>
and time to events finish get / put Signed-off-by: François Mockers <[email protected]>
added Date to last event that didn't have it (StartTask) keep dates of initialize, start and finish to get durations by step Signed-off-by: François Mockers <[email protected]>
Signed-off-by: François Mockers <[email protected]>
Signed-off-by: François Mockers <[email protected]>
Signed-off-by: François Mockers <[email protected]>
|
@vito it's rebased ! |
|
I may be missing something... but has this made its way into concourse 5.2.0? Because I don't see no task durations on my dashboard :-( |
|
Ah... it's on hover. Nevermind. |



for #1788
task duration is displayed on the right of finished tasks:
