-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/counter: don't write counters to disk if mode=off
It was decided in golang/go#63832 that when the telemetry mode is "off" no telemetry data should be written to the file system. However, the current implementation of "off" still creates the counter file -- it just doesn't produce any reports. Fix this to not even create the counter file when the mode is off. This was rather tricky to implement, as it required auditing a lot of code to see that we don't reach openMapped. However, per discussion with pjw@ it should be sufficient to implement this check in Open, as is done here. This broke some tests because 1. some tests were reading the wrong mode file (fixed by setting telemetry.ModeFile in counter_test.go) 2. the E2E tests were incorrectly escaping the RunProg test.run regexp (fixed by simplifying the RunProg logic) For golang/go#63832 Change-Id: I47066a97a8fd17c4c2be776077d718e9cdbaf65a Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/542055 Auto-Submit: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Peter Weinberger <[email protected]>
- Loading branch information
Showing
6 changed files
with
122 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters