0xERR0R / blocky

Fast and lightweight DNS proxy as ad-blocker for local network with many features
https://0xERR0R.github.io/blocky/
Apache License 2.0
4.83k stars 211 forks source link

refactor: Use package local metrics #1605

Open SuperQ opened 2 months ago

SuperQ commented 2 months ago

Part 2 (#1578)

Improve performance of metrics by moving them to the package that needs them. This reduces the overhead to a simple atomic increment for basic counters like cache hits/misses. This also uses promauto to avoid the second step of having to register metrics.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.85%. Comparing base (fe84ab8) to head (823c916). Report is 147 commits behind head on main.

Files with missing lines Patch % Lines
lists/list_cache.go 77.77% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1605 +/- ## ========================================== - Coverage 93.88% 93.85% -0.04% ========================================== Files 78 80 +2 Lines 6361 6574 +213 ========================================== + Hits 5972 6170 +198 - Misses 300 320 +20 + Partials 89 84 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SuperQ commented 2 months ago

I'm working on an improvement to the tests using the client_golang testutil.

github-actions[bot] commented 1 month ago

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

SuperQ commented 1 month ago

Not really stale, but I haven't had a chance to work on the coverage change.

SuperQ commented 4 weeks ago

@0xERR0R, how do you feel about the coverage change here?

0xERR0R commented 2 weeks ago

@0xERR0R, how do you feel about the coverage change here?

It is always nice to cover more code, but it is not an ultimate goal to have 100% coverage :)