summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2010-07-24 16:23:52 -0700
committerJoshua Haberman <joshua@reverberate.org>2010-07-24 16:23:52 -0700
commit678799082b9775e601a09af9aa68e59fc1c64f6f (patch)
tree26ac1962d01dac957b04f3ef80d5a7d7c465c930 /Makefile
parent672f4617e2ab7923806c6d6a44d16e128e16b3a4 (diff)
Stream decoding benchmark.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 19 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 749c5a7..203bed6 100644
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ clean:
# The core library (core/libupb.a)
SRC=core/upb.c stream/upb_decoder.c core/upb_table.c core/upb_def.c core/upb_string.c \
- core/upb_stream.c stream/upb_stdio.c stream/upb_textprinter.c \
+ core/upb_stream.c stream/upb_stdio.c stream/upb_strstream.c stream/upb_textprinter.c \
descriptor/descriptor.c
$(SRC): perf-cppflags
# Parts of core that are yet to be converted.
@@ -154,10 +154,10 @@ tests/tests: core/libupb.a
tools/upbc: core/libupb.a
# Benchmarks
-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
+#UPB_BENCHMARKS=benchmarks/b.parsetostruct_googlemessage1.upb_table \
+# benchmarks/b.parsetostruct_googlemessage2.upb_table
+UPB_BENCHMARKS=benchmarks/b.parsestream_googlemessage1.upb_table \
+ benchmarks/b.parsestream_googlemessage2.upb_table
BENCHMARKS=$(UPB_BENCHMARKS) \
benchmarks/b.parsetostruct_googlemessage1.proto2_table \
@@ -204,6 +204,20 @@ benchmarks/b.parsetostruct_googlemessage2.upb_table_byref: \
-DMESSAGE_FILE=\"google_message2.dat\" \
-DBYREF=true $(LIBUPB)
+benchmarks/b.parsestream_googlemessage1.upb_table \
+benchmarks/b.parsestream_googlemessage2.upb_table: \
+ benchmarks/parsestream.upb_table.c $(LIBUPB) benchmarks/google_messages.proto.pb
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o benchmarks/b.parsestream_googlemessage1.upb_table $< \
+ -DMESSAGE_NAME=\"benchmarks.SpeedMessage1\" \
+ -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
+ -DMESSAGE_FILE=\"google_message1.dat\" \
+ $(LIBUPB)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o benchmarks/b.parsestream_googlemessage2.upb_table $< \
+ -DMESSAGE_NAME=\"benchmarks.SpeedMessage2\" \
+ -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
+ -DMESSAGE_FILE=\"google_message2.dat\" \
+ $(LIBUPB)
+
benchmarks/b.parsetostruct_googlemessage1.proto2_table \
benchmarks/b.parsetostruct_googlemessage2.proto2_table: \
benchmarks/parsetostruct.proto2_table.cc benchmarks/google_messages.pb.cc
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback