forked from rustls/rustls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bench-measure.mk
55 lines (45 loc) · 1.99 KB
/
bench-measure.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: perf perffull perf13 measure memory clean
RECORD=perf record -F2000 --call-graph dwarf,16000 --
FLAMEGRAPH=perf script | ~/FlameGraph/stackcollapse-perf.pl | ~/FlameGraph/flamegraph.pl >
MEMUSAGE=/usr/bin/env time -f %M
BENCH:=./target/release/examples/bench
perf: $(BENCH)
$(RECORD) $(BENCH) bulk TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
$(FLAMEGRAPH) perf-aes128-rustls.svg
perffull: $(BENCH)
$(RECORD) $(BENCH) bulk TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$(FLAMEGRAPH) perf-aes256-rustls.svg
$(RECORD) $(BENCH) bulk TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
$(FLAMEGRAPH) perf-chacha-rustls.svg
$(RECORD) $(BENCH) handshake TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$(FLAMEGRAPH) perf-fullhs-rustls.svg
$(RECORD) $(BENCH) handshake-resume TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$(FLAMEGRAPH) perf-resume-rustls.svg
$(RECORD) $(BENCH) handshake-ticket TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$(FLAMEGRAPH) perf-ticket-rustls.svg
perf13:
$(RECORD) $(BENCH) handshake-ticket TLS13_AES_256_GCM_SHA384
$(FLAMEGRAPH) perf-ticket13-rustls.svg
measure: $(BENCH)
$^ bulk TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
$^ bulk TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$^ bulk TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
$^ bulk TLS13_AES_256_GCM_SHA384
$^ handshake TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$^ handshake-resume TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$^ handshake-ticket TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
$^ handshake TLS13_AES_256_GCM_SHA384
$^ handshake-resume TLS13_AES_256_GCM_SHA384
$^ handshake-ticket TLS13_AES_256_GCM_SHA384
memory: $(BENCH)
$(MEMUSAGE) $^ memory TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 100
$(MEMUSAGE) $^ memory TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 1000
$(MEMUSAGE) $^ memory TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 5000
$(MEMUSAGE) $^ memory TLS13_AES_256_GCM_SHA384 100
$(MEMUSAGE) $^ memory TLS13_AES_256_GCM_SHA384 1000
$(MEMUSAGE) $^ memory TLS13_AES_256_GCM_SHA384 5000
clean:
rm -f perf-*.svg
cargo clean
$(BENCH):
cargo build --profile=bench -p rustls --example bench