1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-26 21:05:00 +02:00
opentelemetry-go/log
Sam Xie 5b2ce02911
Stabilize benchmark result of BenchmarkValueEqual (#5717)
`BenchmarkValueEqual` does not run the target code with `b.N`, as
https://pkg.go.dev/testing#hdr-Benchmarks states. Thus, it cannot
produce a stable benchmark result. And, it would fail the benchmark:
https://github.com/open-telemetry/opentelemetry-go/actions/runs/10412186663.
This PR fixes this issue.

Here is the result of `benchstat`

```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/log
                       │       old.txt        │                      new.txt                       │
                       │        sec/op        │       sec/op        vs base                        │
ValueEqual/2_with_1-10   0.0000002000n ± 100%   3.1450000000n ± 1%  +1572499900.00% (p=0.000 n=10)

                       │  old.txt   │            new.txt             │
                       │    B/op    │    B/op     vs base            │
ValueEqual/2_with_1-10   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

                       │  old.txt   │            new.txt             │
                       │ allocs/op  │ allocs/op   vs base            │
ValueEqual/2_with_1-10   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal
```
2024-08-16 09:33:36 -07:00
..
embedded Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
global Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
internal/global Identify logger with schemaURL in global logger provider (#5375) 2024-05-18 11:00:00 +02:00
logtest Introduce logtest.AssertRecordEqual (#5499) 2024-06-12 11:35:11 -07:00
noop Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
DESIGN.md chore(deps): update dependency codespell to v2.3.0 (#5409) 2024-05-24 18:09:31 +02:00
doc.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
go.mod Releases v1.28.0/v0.50.0/v0.4.0 (#5569) 2024-07-02 13:29:45 -07:00
go.sum fix(deps): update module github.com/go-logr/logr to v1.4.2 (#5393) 2024-05-21 13:58:14 -07:00
keyvalue_bench_test.go Stabilize benchmark result of BenchmarkValueEqual (#5717) 2024-08-16 09:33:36 -07:00
keyvalue_test.go [chore] Add asasalint linter (#5653) 2024-07-31 08:41:11 +02:00
keyvalue.go log: Add missing notice to Bytes, Slice, Map doc comment (#5598) 2024-07-11 06:39:08 +02:00
kind_string.go Rename log List value type to Slice (#4936) 2024-02-18 08:08:28 -08:00
logger_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
logger.go Add the Enabled method to the Logger (#5071) 2024-03-15 08:15:44 -07:00
provider.go Document Logger name and version recommendations (#5613) 2024-07-12 20:28:43 +02:00
README.md Add READMEs to every package (#5103) 2024-03-26 20:13:54 +01:00
record_bench_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
record_test.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
record.go [chore] Simplify the license header (#4987) 2024-02-29 07:05:28 +01:00
severity_string.go Add SeverityUndefined to otel/log (#5072) 2024-03-14 13:22:12 -07:00
severity_test.go Add SeverityUndefined to otel/log (#5072) 2024-03-14 13:22:12 -07:00
severity.go Add SeverityUndefined to otel/log (#5072) 2024-03-14 13:22:12 -07:00

Log API

PkgGoDev