graphite-clickhouse icon indicating copy to clipboard operation
graphite-clickhouse copied to clipboard

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

Open msaf1980 opened this issue 3 years ago • 0 comments

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 avatar May 26 '21 07:05 msaf1980