This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":1,"resource":"file:///Users/n7n/dev/cubicasa/api-backend/exporter/pkg/headless/client.go","entries":[{"id":"WXI7.go","source":"Undo Chain Diff","timestamp":1756720987594},{"id":"vNxs.go","source":"Undo Chain Diff","timestamp":1756721019315},{"id":"ZlMP.go","source":"Undo Chain Diff","timestamp":1756721226640},{"id":"Iu2M.go","source":"Undo Chain Diff","timestamp":1756721237584},{"id":"HnXl.go","source":"Undo Chain Diff","timestamp":1756721247811},{"id":"6r6X.go","source":"Undo Chain Diff","timestamp":1756721274689},{"id":"klap.go","source":"Undo Chain Diff","timestamp":1756721319441},{"id":"yEtp.go","source":"Undo Chain Diff","timestamp":1756721338208},{"id":"GzOJ.go","source":"Undo Chain Diff","timestamp":1756721421217},{"id":"FCoF.go","source":"Undo Chain Diff","timestamp":1756721747300},{"id":"bDFa.go","source":"Undo Chain Diff","timestamp":1756721763902},{"id":"F1FC.go","source":"Undo Chain Diff","timestamp":1756721994387},{"id":"XSBg.go","source":"Undo Accept Diff","timestamp":1756722265891},{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt | |
go tool pprof -http :8080 cpu.out | |
go tool pprof -http :8081 mem.out | |
go tool trace trace.out | |
go tool pprof $FILENAME.test cpu.out | |
# (pprof) list <func name> | |
# go get -u golang.org/x/perf/cmd/benchstat | |
benchstat bench.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RESOURCES | |
# https://blog.codeship.com/tuning-postgresql-with-pgbench/ | |
# http://www.linux-magazin.de/ausgaben/2013/07/postgresql-tuning/5/ | |
# https://blog.timescale.com/timescaledb-vs-6a696248104e | |
# https://heapanalytics.com/blog/engineering/analyzing-performance-millions-sql-queries-one-special-snowflake | |
# https://www.citusdata.com/blog/2018/02/15/when-postgresql-blocks/ | |
# https://amplitude.engineering/how-a-single-postgresql-config-change-improved-slow-query-performance-by-50x-85593b8991b0 | |
# https://devcenter.heroku.com/articles/postgresql-indexes | |
# http://www.craigkerstiens.com/2013/01/10/more-on-postgres-performance/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |