-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (44 loc) · 1.49 KB
/
Makefile
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
54
55
56
57
FIXTURES := fixtures/test-rna.fasta fixtures/test-dna.fasta
REL_EXE := target/release/tallyman
RNA50 = tests/inputs/rna-50k.fasta
RNA100 = tests/inputs/rna-100k.fasta
DNA_FA = tests/inputs/dna.fasta
DNA_FQ = tests/inputs/dna.fastq
DNA_DUP = tests/inputs/dups.fa
DNA_SHORT = tests/inputs/too_short.fa
BIG_DNA = fixtures/test-dna.fasta
BIG_RNA = fixtures/test-rna.fasta
fitty:
cargo run -- -v -r $(RNA50) -d $(DNA_FA) -o -
dups:
cargo run -- -v -r $(RNA50) -d $(DNA_DUP) -o -
short:
cargo run -- -v -r $(RNA50) -d $(DNA_SHORT) -o -
hunna:
cargo run -- -v -r $(RNA100) -d $(DNA_FA) -o -
big:
cargo run -- -v -r $(BIG_RNA) -d $(BIG_DNA) -o /dev/null
io:
cargo instruments -t io --release -- -r $(BIG_RNA) -d $(BIG_DNA) -o /dev/null
alloc:
cargo instruments -t Allocations --release -- -r $(BIG_RNA) -d $(BIG_DNA) -o /dev/null
time:
cargo instruments -t time --release -- -r $(BIG_RNA) -d $(BIG_DNA) -o /dev/null
.PHONY: benchmark
benchmark: fixtures
cargo build --release
hyperfine --warmup 1 '$(REL_EXE) -r fixtures/test-rna.fasta -d fixtures/test-dna.fasta -o /dev/null'
.PHONY: cachegrind
cachegrind: fixtures
valgrind --tool=cachegrind ./$(REL_EXE) -r fixtures/test-rna.fasta -d fixtures/test-dna.fasta -o /dev/null
.PHONY: fixtures
fixtures: $(FIXTURES)
.PHONY: setup-mac
setup-mac:
brew install hyperfine
# This is a Mac-compatible fork
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
fixtures/%.fasta: fixtures/%.tar.xz
tar -C fixtures -x -f $<
touch $@