summaryrefslogtreecommitdiffstats
path: root/run_benchmarks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_benchmarks.sh')
-rwxr-xr-xrun_benchmarks.sh35
1 files changed, 0 insertions, 35 deletions
diff --git a/run_benchmarks.sh b/run_benchmarks.sh
deleted file mode 100755
index 87dfd17..0000000
--- a/run_benchmarks.sh
+++ /dev/null
@@ -1,35 +0,0 @@
1#!/bin/bash
2set -e
3
4# Colors for output
5GREEN='\033[0;32m'
6BLUE='\033[0;34m'
7YELLOW='\033[1;33m'
8NC='\033[0m' # No Color
9
10echo -e "${BLUE}Running Nostr Library Benchmarks${NC}"
11echo -e "${BLUE}Comparing: NWIO vs NBD-WTF vs Fiatjaf${NC}"
12echo ""
13
14# First, install comparison dependencies if needed
15echo -e "${YELLOW}Ensuring comparison dependencies are available...${NC}"
16go get -tags=benchcmp -t ./...
17echo ""
18
19# Run all benchmarks with the benchcmp build tag
20echo -e "${GREEN}Running all benchmarks...${NC}"
21go test -tags=benchcmp -bench=. -benchmem -benchtime=1s -run=^$ | tee benchmark_results.txt
22
23echo ""
24echo -e "${GREEN}Results saved to benchmark_results.txt${NC}"
25echo ""
26echo -e "${BLUE}To run specific benchmark groups:${NC}"
27echo " go test -tags=benchcmp -bench=BenchmarkEventUnmarshal -benchmem"
28echo " go test -tags=benchcmp -bench=BenchmarkEventSign -benchmem"
29echo " go test -tags=benchcmp -bench=BenchmarkEventVerify -benchmem"
30echo " go test -tags=benchcmp -bench=BenchmarkFilterMatch -benchmem"
31echo ""
32echo -e "${BLUE}To compare specific libraries:${NC}"
33echo " go test -tags=benchcmp -bench='.*_NWIO' -benchmem"
34echo " go test -tags=benchcmp -bench='.*_NBD' -benchmem"
35echo " go test -tags=benchcmp -bench='.*_Fiat' -benchmem"