The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/tsdb/prometheus/Makefile

42 lines
1.3 KiB

GO = go
SHELL = /bin/zsh
ITERATIONS=10
BENCH=repeat $(ITERATIONS) $(LEFT_BRACKET) $(GO) test -benchmem -run=^$$ -bench
PROFILE=$(GO) test -benchmem -run=^$$ -benchtime 1x -memprofile memprofile.out -memprofilerate 1 -cpuprofile cpuprofile.out -bench
LEFT_BRACKET = {
RIGHT_BRACKET = }
memprofile-exemplar memprofile-range: %: --%
$(GO) tool pprof -http=localhost:6061 memprofile.out
cpuprofile-exemplar cpuprofile-range: %: --%
$(GO) tool pprof -http=localhost:6061 cpuprofile.out
benchmark-exemplar benchmark-range: %: --%
sed -i 's/buffered/querydata/g' old.txt
benchstat old.txt new.txt
rm old.txt new.txt
--benchmark-range:
$(BENCH) ^BenchmarkRangeJson ./buffered >> old.txt $(RIGHT_BRACKET)
$(BENCH) ^BenchmarkRangeJson ./querydata >> new.txt $(RIGHT_BRACKET)
--memprofile-range:
$(PROFILE) ^BenchmarkRangeJson ./querydata
--cpuprofile-range:
$(PROFILE) ^BenchmarkRangeJson ./querydata
--benchmark-exemplar:
$(BENCH) ^BenchmarkExemplarJson ./buffered >> old.txt $(RIGHT_BRACKET)
$(BENCH) ^BenchmarkExemplarJson ./querydata >> new.txt $(RIGHT_BRACKET)
--memprofile-exemplar:
$(PROFILE) ^BenchmarkExemplarJson ./querydata
--cpuprofile-exemplar:
$(PROFILE) ^BenchmarkExemplarJson ./querydata
.PHONY: benchmark-range benchmark-exemplar memprofile-range memprofile-exemplar cpuprofile-range cpuprofile-exemplar