thanos-community / obslytics

Tools and Services allowing seamless usage of Observability data from Prometheus, Thanos, Cortex, M3DB, Loki and more!
Apache License 2.0
32 stars 8 forks source link

Added benchmarks. #30

Closed bwplotka closed 3 years ago

bwplotka commented 3 years ago

How to invoke: /tmp/___2BenchmarkExport_in_github_com_thanos_community_obslytics_cmd_obslytics.test -test.v -test.paniconexit0 -test.bench ^\QBenchmarkExport\E$ -test.run ^$ -test.benchtime 1s

bwplotka commented 3 years ago

From CLI: go test -bench ^BenchmarkExport$ -run ^$ -benchtime 20s -memprofile mem.out ./cmd/obslytics/...

bwplotka commented 3 years ago

For me it shows

go test -bench ^BenchmarkExport$ -run ^$ -benchtime 20s -memprofile mem.out ./cmd/obslytics/...
goos: linux
goarch: amd64
pkg: github.com/thanos-community/obslytics/cmd/obslytics
cpu: Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
BenchmarkExport/1000_series_with_100_labels_with_millions_samples-12                 222         100568091 ns/op        68724755 B/op     219162 allocs/op
PASS
ok      github.com/thanos-community/obslytics/cmd/obslytics     33.456s
bwplotka commented 3 years ago

go tool pprof -http=:8081 mem.out

bwplotka commented 3 years ago

benchcmp/benchstat