summaryrefslogtreecommitdiff
path: root/benchmark/gen.sh
blob: 288071eb232552fcaade8e30a9e5f6b7e42723c7 (plain)
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
58
59
#!/bin/bash

cd `dirname $0`
CXXFLAGS="-O3 -msse3 -I../src -I../descriptor -Wall"
CFLAGS="-std=c99 $CXXFLAGS"
set -e
set -v

gcc -DMESSAGE_NAME=\"benchmarks.SpeedMessage1\" \
    -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
    -DMESSAGE_FILE=\"google_message1.dat\" \
    -DBYREF=false \
    $CFLAGS \
    parsetostruct_upb_table.c -o b_parsetostruct_googlemessage1_upb_table_byval ../src/libupb.a

gcc -DMESSAGE_NAME=\"benchmarks.SpeedMessage1\" \
    -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
    -DMESSAGE_FILE=\"google_message1.dat\" \
    -DBYREF=true \
    $CFLAGS \
    parsetostruct_upb_table.c -o b_parsetostruct_googlemessage1_upb_table_byref ../src/libupb.a

gcc -DMESSAGE_NAME=\"benchmarks.SpeedMessage2\" \
    -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
    -DMESSAGE_FILE=\"google_message2.dat\" \
    -DBYREF=false \
    $CFLAGS \
    parsetostruct_upb_table.c -o b_parsetostruct_googlemessage2_upb_table_byval ../src/libupb.a

gcc -DMESSAGE_NAME=\"benchmarks.SpeedMessage2\" \
    -DMESSAGE_DESCRIPTOR_FILE=\"google_messages.proto.pb\" \
    -DMESSAGE_FILE=\"google_message2.dat\" \
    -DBYREF=true \
    $CFLAGS \
    parsetostruct_upb_table.c -o b_parsetostruct_googlemessage2_upb_table_byref ../src/libupb.a

g++ -DMESSAGE_CIDENT="benchmarks::SpeedMessage2" \
    -DMESSAGE_FILE=\"google_message2.dat\" \
    -DMESSAGE_HFILE=\"google_messages.pb.h\" \
    $CXXFLAGS \
    parsetostruct_proto2_table.cc -o b_parsetostruct_googlemessage2_proto2_table -lprotobuf -lpthread google_messages.pb.o

g++ -DMESSAGE_CIDENT="benchmarks::SpeedMessage2" \
    -DMESSAGE_FILE=\"google_message2.dat\" \
    -DMESSAGE_HFILE=\"google_messages.pb.h\" \
    $CXXFLAGS \
    parsetostruct_proto2_compiled.cc -o b_parsetostruct_googlemessage2_proto2_compiled -lprotobuf -lpthread google_messages.pb.o

g++ -DMESSAGE_CIDENT="benchmarks::SpeedMessage1" \
    -DMESSAGE_FILE=\"google_message1.dat\" \
    -DMESSAGE_HFILE=\"google_messages.pb.h\" \
    $CXXFLAGS \
    parsetostruct_proto2_table.cc -o b_parsetostruct_googlemessage1_proto2_table -lprotobuf -lpthread google_messages.pb.o

g++ -DMESSAGE_CIDENT="benchmarks::SpeedMessage1" \
    -DMESSAGE_FILE=\"google_message1.dat\" \
    -DMESSAGE_HFILE=\"google_messages.pb.h\" \
    $CXXFLAGS \
    parsetostruct_proto2_compiled.cc -o b_parsetostruct_googlemessage1_proto2_compiled -lprotobuf -lpthread google_messages.pb.o
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback