commit | 58a1122356f505257a33b1192e509b10522fd6b1 | [log] [tgz] |
---|---|---|
author | Rob Findley <rfindley@google.com> | Tue Nov 05 21:51:31 2024 +0000 |
committer | Robert Findley <rfindley@google.com> | Wed Nov 06 14:24:47 2024 +0000 |
tree | 78f36def02a3088a7f5096bac8fae8814afb4cb2 | |
parent | bf5a09be81231faa063f31b2cbec45d03252cf3e [diff] |
internal/counter: use ReadMapped from counter.Read counter.Read, which is the implementation of countertest.ReadCounter, was using os.ReadFile to read the counter file's contents. As we have seen elsewhere, this may lead to synchronization issues. To ensure we observe all active counts we should read via mmap. For this reason, counter.ReadFile was already using the ReadMapped helper. Update Read to do the same. I believe this fixes two test failures that we've observed in gopls. For golang/go#68659 For golang/go#69132 Change-Id: I8d09b98fa2e69ac1b9a7580b061d4b266130773c Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/625496 Auto-Submit: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This repository holds the Go Telemetry server code and libraries, used for hosting telemetry.go.dev and instrumenting Go toolchain programs with opt-in telemetry.
Warning: this repository is intended for use only in tools maintained by the Go team, including tools in the Go distribution and auxiliary tools like gopls or govulncheck. There are no compatibility guarantees for any of the packages here: public APIs will change in breaking ways as the telemetry integration is refined.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/telemetry.
The main issue tracker for the telemetry repository is located at https://go.dev/issues. Prefix your issue with “x/telemetry:” in the subject line, so it is easy to find.
This repository uses eslint to format TS files, stylelint to format CSS files, and prettier to format TS, CSS, Markdown, and YAML files.
See the style guides:
It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI.
./npm install
./npm run all