Skip to content

Instantly share code, notes, and snippets.

View slrtbtfs's full-sized avatar

Tobias Guggenmos slrtbtfs

  • DFN-CERT
View GitHub Profile
@slrtbtfs
slrtbtfs / Parser Benchmark master
Created November 21, 2019 18:18
Benchmarks for removing parser concurrency
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/promql
BenchmarkParser/a-8 876998 1952 ns/op 256 B/op 4 allocs/op
BenchmarkParser/metric-8 877825 1308 ns/op 256 B/op 4 allocs/op
BenchmarkParser/1-8 348022 3526 ns/op 592 B/op 7 allocs/op
BenchmarkParser/1_>=_bool_1-8 343376 4234 ns/op 592 B/op 7 allocs/op
BenchmarkParser/1_+_2/(3*1)-8 252307 5212 ns/op 592 B/op 7 allocs/op
BenchmarkParser/foo_or_bar-8 295990 3827 ns/op 672 B/op 10 allocs/op
BenchmarkParser/foo_and_bar_unless_baz_or_qux-8 108090 10518 ns/op 688 B/op 10 allocs/op
@slrtbtfs
slrtbtfs / Benchmark with PR
Created November 21, 2019 16:36
PromQL parser Benchmarks
goos: linux
goarch: amd64
pkg: github.com/slrtbtfs/prometheus/promql
BenchmarkParser/a-8 655378 2850 ns/op 456 B/op 9 allocs/op
BenchmarkParser/metric-8 815646 1519 ns/op 456 B/op 9 allocs/op
BenchmarkParser/1-8 354025 3210 ns/op 824 B/op 12 allocs/op
BenchmarkParser/1_>=_bool_1-8 298111 4256 ns/op 824 B/op 12 allocs/op
BenchmarkParser/1_+_2/(3*1)-8 233142 5193 ns/op 824 B/op 12 allocs/op
BenchmarkParser/foo_or_bar-8 319932 3887 ns/op 904 B/op 15 allocs/op
BenchmarkParser/foo_and_bar_unless_baz_or_qux-8 220437 5540 ns/op 920 B/op 15 allocs/op
@slrtbtfs
slrtbtfs / System Info
Created November 14, 2019 17:40
PromQL Benchmark Results
OS: Clear Linux OS x86_64
Host: 20L8S02D00 ThinkPad T480s
Kernel: 5.3.8-854.native
CPU: Intel i5-8250U (8) @ 3.400GHz
GPU: Intel UHD Graphics 620
Memory: 7778MiB
This file has been truncated, but you can view the full file.
>> running all tests
GO111MODULE=on go test -race -mod=vendor ./...
ok github.com/prometheus/prometheus/cmd/prometheus (cached)
ok github.com/prometheus/prometheus/cmd/promtool (cached)
ok github.com/prometheus/prometheus/config (cached)
ok github.com/prometheus/prometheus/discovery (cached)
ok github.com/prometheus/prometheus/discovery/azure (cached)
? github.com/prometheus/prometheus/discovery/config [no test files]
ok github.com/prometheus/prometheus/discovery/consul (cached)
ok github.com/prometheus/prometheus/discovery/dns (cached)