diff options
author | Yilun Chong <chongyilun250@sina.com> | 2018-04-10 14:23:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 14:23:07 -0700 |
commit | 5fb73f80f29e2521e450af40acd6b762ff483026 (patch) | |
tree | 65b0a8a0cce04ca2d4a1ce13a4803513be14d358 /benchmarks/python/python_benchmark_messages.cc | |
parent | d7d863ea077690954494fba168f5aba198a8f41c (diff) | |
parent | 805174eda2356df1b01752c8bc57019e696e0a75 (diff) | |
download | protobuf-5fb73f80f29e2521e450af40acd6b762ff483026.tar.gz protobuf-5fb73f80f29e2521e450af40acd6b762ff483026.tar.bz2 protobuf-5fb73f80f29e2521e450af40acd6b762ff483026.zip |
Merge pull request #4415 from BSBandme/experiement
Add dashboard support
Diffstat (limited to 'benchmarks/python/python_benchmark_messages.cc')
-rw-r--r-- | benchmarks/python/python_benchmark_messages.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/benchmarks/python/python_benchmark_messages.cc b/benchmarks/python/python_benchmark_messages.cc new file mode 100644 index 00000000..ded16fe9 --- /dev/null +++ b/benchmarks/python/python_benchmark_messages.cc @@ -0,0 +1,29 @@ +#include <Python.h> + +#include "benchmarks.pb.h" +#include "datasets/google_message1/proto2/benchmark_message1_proto2.pb.h" +#include "datasets/google_message1/proto3/benchmark_message1_proto3.pb.h" +#include "datasets/google_message2/benchmark_message2.pb.h" +#include "datasets/google_message3/benchmark_message3.pb.h" +#include "datasets/google_message4/benchmark_message4.pb.h" + +static PyMethodDef python_benchmark_methods[] = { + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + + +PyMODINIT_FUNC +initlibbenchmark_messages() { + benchmarks::BenchmarkDataset().descriptor(); + benchmarks::proto3::GoogleMessage1().descriptor(); + benchmarks::proto2::GoogleMessage1().descriptor(); + benchmarks::proto2::GoogleMessage2().descriptor(); + benchmarks::google_message3::GoogleMessage3().descriptor(); + benchmarks::google_message4::GoogleMessage4().descriptor(); + + PyObject *m; + + m = Py_InitModule("libbenchmark_messages", python_benchmark_methods); + if (m == NULL) + return; +} |