summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-08-04 22:06:02 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-08-04 22:06:02 -0700
commit306bc554c67c23ddd52e5ece0e3971214b2da4e7 (patch)
tree898406cd3264ee2d001d334cd2b81922cbd23330 /Makefile
parent1733b582579927379bc04a5838add06b76ada427 (diff)
More work on benchmarks (performance tests).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 210f4ac..39569b6 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
# Function to expand a wildcard pattern recursively.
rwildcard=$(strip $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)$(filter $(subst *,%,$2),$d)))
-.PHONY: all clean test benchmarks
+.PHONY: all clean test benchmarks benchmark
CC=gcc
CXX=g++
CFLAGS=-std=c99
@@ -33,15 +33,21 @@ tests/tests: src/libupb.a
tools/upbc: src/libupb.a
# Benchmarks
-BENCHMARKS=benchmarks/b.parsetostruct_googlemessage1.upb_table_byval \
- benchmarks/b.parsetostruct_googlemessage1.upb_table_byref \
- benchmarks/b.parsetostruct_googlemessage2.upb_table_byval \
- benchmarks/b.parsetostruct_googlemessage2.upb_table_byref \
+UPB_BENCHMARKS=benchmarks/b.parsetostruct_googlemessage1.upb_table_byval \
+ benchmarks/b.parsetostruct_googlemessage1.upb_table_byref \
+ benchmarks/b.parsetostruct_googlemessage2.upb_table_byval \
+ benchmarks/b.parsetostruct_googlemessage2.upb_table_byref
+
+BENCHMARKS=$(UPB_BENCHMARKS) \
benchmarks/b.parsetostruct_googlemessage1.proto2_table \
benchmarks/b.parsetostruct_googlemessage2.proto2_table \
benchmarks/b.parsetostruct_googlemessage1.proto2_compiled \
benchmarks/b.parsetostruct_googlemessage2.proto2_compiled
+upb_benchmarks: $(UPB_BENCHMARKS)
benchmarks: $(BENCHMARKS)
+benchmark:
+ @rm -f benchmarks/results
+ @for test in benchmarks/b.* ; do ./$$test ; done
benchmarks/google_messages.proto.pb: benchmarks/google_messages.proto
# TODO: replace with upbc.
@@ -107,4 +113,4 @@ benchmarks/b.parsetostruct_googlemessage2.proto2_compiled: \
-include deps
deps: $(SRC) $(HEADERS) gen-deps.sh Makefile
- ./gen-deps.sh $(SRC)
+ @./gen-deps.sh $(SRC)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback