File: Makefile

package info (click to toggle)
rust-laurel 0.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,060 kB
  • sloc: ansic: 3,562; makefile: 65; sh: 50
file content (28 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
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
# Generate benchmark flamegraph like this:
#
# $ make -f benches/Makefile binary=./target/release/deps/coalesce_execve-76764715a5348906

binary ?= $(error "Set binary variable")
FG_DIR ?= ~/src/flamegraph

.PHONY: all
all: $(binary).svg

.PHONY: clean
clean:
	rm -f $(binary).prof $(binary).stacks $(binary).svg

.PHONY: view
view: $(binary).svg
	firefox $^

%.svg: %.stacks
	$(FG_DIR)/flamegraph.pl < $^ > $@.t
	mv $@.t $@

%.prof: %
	$<

%.stacks: % %.prof
	google-pprof --collapsed $^ > $@.t
	mv $@.t $@