Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues/354: Integrate ong packages with new logger #358

Merged
merged 14 commits into from
Aug 14, 2023
Merged

Conversation

komuw
Copy link
Owner

@komuw komuw commented Aug 14, 2023

@komuw komuw linked an issue Aug 14, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (issues/354-slogtest2@7f2f3e4). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             issues/354-slogtest2     #358   +/-   ##
=======================================================
  Coverage                        ?   75.40%           
=======================================================
  Files                           ?       44           
  Lines                           ?     5107           
  Branches                        ?        0           
=======================================================
  Hits                            ?     3851           
  Misses                          ?      997           
  Partials                        ?      259           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from issues/354-slogtest2 to main August 14, 2023 16:17
@komuw komuw changed the title Issues/354 integrate issues/354: Integrate ong packages with new logger Aug 14, 2023
@komuw komuw marked this pull request as ready for review August 14, 2023 16:23
@komuw komuw merged commit 8f6609e into main Aug 14, 2023
@komuw komuw deleted the issues/354-integrate branch August 14, 2023 16:29
komuw added a commit that referenced this pull request Aug 14, 2023
komuw added a commit that referenced this pull request Aug 14, 2023
- Updates: #354

The perfomance for the average case seems to be similar.
But for the worst case, it is about 5% slowwer.

go test -timeout 7m -count=10 -run=XXXX -bench=BenchmarkAverageCase/ong github.com/komuw/ong/log > old.txt
go test -timeout 7m -count=10 -run=XXXX -bench=BenchmarkAverageCase/ong github.com/komuw/ong/log > new.txt
benchstat old.txt new.txt

pkg: github.com/komuw/ong/log
cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
                  │   old.txt    │            new.txt             │
                  │    sec/op    │    sec/op     vs base          │
AverageCase/ong-8   4.987µ ± 13%   5.093µ ± 10%  ~ (p=0.128 n=10)

                  │   old.txt    │               new.txt               │
                  │     B/op     │     B/op      vs base               │
AverageCase/ong-8   1.475Ki ± 0%   1.411Ki ± 0%  -4.30% (p=0.000 n=10)

                  │  old.txt   │              new.txt              │
                  │ allocs/op  │ allocs/op   vs base               │
AverageCase/ong-8   27.00 ± 0%   25.00 ± 0%  -7.41% (p=0.000 n=10)

go test -timeout 7m -count=10 -run=XXXX -bench=BenchmarkWorstCase/ong github.com/komuw/ong/log > old.txt
go test -timeout 7m -count=10 -run=XXXX -bench=BenchmarkWorstCase/ong github.com/komuw/ong/log > new.txt
benchstat old.txt new.txt

pkg: github.com/komuw/ong/log
cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
                │   old.txt   │              new.txt               │
                │   sec/op    │   sec/op     vs base               │
WorstCase/ong-8   8.196µ ± 9%   8.643µ ± 9%  +5.45% (p=0.023 n=10)

                │   old.txt    │               new.txt               │
                │     B/op     │     B/op      vs base               │
WorstCase/ong-8   2.063Ki ± 0%   1.938Ki ± 0%  -6.11% (p=0.000 n=10)

                │  old.txt   │              new.txt              │
                │ allocs/op  │ allocs/op   vs base               │
WorstCase/ong-8   42.00 ± 0%   38.00 ± 0%  -9.52% (p=0.000 n=10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ong/log: integrate with slog tests
2 participants