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

rollup: split rules for plain/tagged metrics (for perfomance) #162

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msaf1980
Copy link
Collaborator

Try to split rules for plain/tagged metrics for reduce checks.

Benchmarks

For example:
BenchmarkSum-6 No split rules
BenchmarkSumAuto-6 Try to auto detect split rules
BenchmarkSumSeparated-6 Rules with type (all/plain/tagged_regex)

$ go test -run -benchmem -bench ^.*$ github.com/lomik/graphite-clickhouse/helper/rollup
goos: linux
goarch: amd64
pkg: github.com/lomik/graphite-clickhouse/helper/rollup
cpu: Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
BenchmarkSum-6 2933556 409.4 ns/op
BenchmarkSumAuto-6 3276351 367.9 ns/op
BenchmarkSumSeparated-6 3268159 375.0 ns/op
BenchmarkSumTagged-6 867603 1419 ns/op
BenchmarkSumTaggedAuto-6 1372341 879.9 ns/op
BenchmarkSumTaggedSeparated-6 1376115 876.3 ns/op
BenchmarkMax-6 1949413 637.4 ns/op
BenchmarkMaxAuto-6 2530356 478.0 ns/op
BenchmarkMaxSeparated-6 2512434 468.7 ns/op
BenchmarkMaxTagged-6 1000000 1073 ns/op
BenchmarkMaxTaggedAuto-6 2507865 487.6 ns/op
BenchmarkMaxTaggedSeparated-6 2528156 483.6 ns/op
BenchmarkDefault-6 2806245 429.6 ns/op
BenchmarkDefaultAuto-6 2915414 410.7 ns/op
BenchmarkDefaultSeparated-6 2931441 420.0 ns/op
BenchmarkDefaultTagged-6 1263385 952.2 ns/op
BenchmarkDefaultTaggedAuto-6 2817126 430.7 ns/op
BenchmarkDefaultTaggedSeparated-6 2752359 429.2 ns/op

@msaf1980 msaf1980 marked this pull request as draft May 26, 2021 07:23
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.

1 participant