diff options
| author | 2023-10-30 18:39:52 +0000 | |
|---|---|---|
| committer | 2023-10-30 18:39:52 +0000 | |
| commit | 4dbeda984aed24f74358ed98bc79790672aa370c (patch) | |
| tree | 592fd2ff573c9dafacc4e43ada6f16d2e901c8cd /ui/metrics/metrics.go | |
| parent | 87e4128270542d78526409a9154fe2eeb40f797c (diff) | |
| parent | 39825ead17cb714c73c02f9b3abb80b5da536323 (diff) | |
Merge "Remove Bazel metrics/finalize-bazel-metrics." into main
Diffstat (limited to 'ui/metrics/metrics.go')
| -rw-r--r-- | ui/metrics/metrics.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/ui/metrics/metrics.go b/ui/metrics/metrics.go index d68ced859..4a275a88f 100644 --- a/ui/metrics/metrics.go +++ b/ui/metrics/metrics.go @@ -32,7 +32,6 @@ package metrics // of what an event is and how the metrics system is a stack based system. import ( - "fmt" "os" "runtime" "strings" @@ -228,20 +227,6 @@ func (m *Metrics) SetBuildDateTime(buildTimestamp time.Time) { m.metrics.BuildDateTimestamp = proto.Int64(buildTimestamp.UnixNano() / int64(time.Second)) } -func (m *Metrics) UpdateTotalRealTimeAndNonZeroExit(data []byte, bazelExitCode int32) error { - if err := proto.Unmarshal(data, &m.metrics); err != nil { - return fmt.Errorf("Failed to unmarshal proto: %w", err) - } - startTime := *m.metrics.Total.StartTime - endTime := uint64(time.Now().UnixNano()) - - *m.metrics.Total.RealTime = *proto.Uint64(endTime - startTime) - - bazelError := bazelExitCode != 0 - m.metrics.NonZeroExit = proto.Bool(bazelError) - return nil -} - // SetBuildCommand adds the build command specified by the user to the // list of collected metrics. func (m *Metrics) SetBuildCommand(cmd []string) { |