Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: client/logdog/annotee/processor.go

Issue 2069283002: milo: fix step duration (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: simplify step duration computation Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/logdog/annotee/annotation/test_expectations/timestamps_steps_two.proto.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/logdog/annotee/processor.go
diff --git a/client/logdog/annotee/processor.go b/client/logdog/annotee/processor.go
index c63e43e60f0d21d7be107b8da36a424fb29c9443..3770cb19112302ec6e9f51153796a5bdcc69d059 100644
--- a/client/logdog/annotee/processor.go
+++ b/client/logdog/annotee/processor.go
@@ -103,6 +103,11 @@ type Options struct {
// - If this equals 0, metadata will be pushed every time it's updated.
// - If this is 0, DefaultMetadataUpdateInterval will be used.
MetadataUpdateInterval time.Duration
+
+ // Offline specifies whether parsing happens not at the same time as
+ // emitting. If true and CURRENT_TIMESTAMP annotations are not provided
+ // then step start/end times are left empty.
+ Offline bool
}
// Processor consumes data from a list of Stream entries and interacts with the
@@ -130,6 +135,7 @@ func New(c context.Context, o Options) *Processor {
Callbacks: &annotationCallbacks{&p},
Execution: o.Execution,
Clock: clock.Get(c),
+ Offline: o.Offline,
}
return &p
}
@@ -454,9 +460,9 @@ func (h *stepHandler) finish() {
return
}
- // Close the handler. This may send one last annotation to summarize the
+ // This may send one last annotation to summarize the
// state if closing changed it.
- if h.step.Close() {
+ if h.step.Close(nil) {
// Manually mark it updated, since Close callbacks will have unregistered
// us from the standard Updated() reporting loop.
h.updated()
« no previous file with comments | « client/logdog/annotee/annotation/test_expectations/timestamps_steps_two.proto.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698