You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/11/21 13:50:21 UTC

[GitHub] [qpid-proton] jdanekrh opened a new pull request #211: DISCUSS: gbenchmark c++ microbenchmark

jdanekrh opened a new pull request #211: DISCUSS: gbenchmark c++ microbenchmark
URL: https://github.com/apache/qpid-proton/pull/211
 
 
   It might be useful to have some sort of benchmark as part of the tests that live in the project itself.
   
   Regarding scenarios what to test, I was thinking of possibilities like
   
   1. encoding and decoding a message, one test for empty message, another test(s?) for either message containing all data types, or containing long list, long map, something like that
   2. sending data through pn_connection_driver_t, one test could be something like the test below, and possibly more
   3. just create and destroy pn_connection_driver_t, it appeared to me that calling pn_connection_driver_destroy can take almost 500 ms.
   4. create and destroy container in cpp binding
   5. enqueuing and consuming work
   6. full end-user-like scenario that would communicate over network (localhost) to send messages, etc.
   
   Regarding microbenchmarks, there is something similar in proton-j from @franz1981 in https://github.com/apache/qpid-proton-j/tree/ab8e98b0ab18114bfaa2f78f548672cff311522f/tests/performance-jmh.
   
   The benchmark below is wrong on many levels (one I know of is that the benchmarking lib is not in control of how many messages gets sent, and that the pn_connection_driver_t initialization and deletion is not in a special setup and teardown function). It is what I quickly put together.
   
   The https://github.com/google/benchmark library is used because it has packages in distributions and I did not find anything better. If I recall correctly I did not find anything else, for C.
   
   Output looks like
   
   ```
   /c/tests/bench/hellobench
   2019-11-21 14:26:45
   Running /home/jdanek/repos/qpid/qpid-proton/cmake-build-debug-clang/c/tests/bench/hellobench
   Run on (8 X 4200 MHz CPU s)
   CPU Caches:
     L1 Data 32K (x4)
     L1 Instruction 32K (x4)
     L2 Unified 256K (x4)
     L3 Unified 8192K (x1)
   Load Average: 1.25, 1.64, 1.53
   -----------------------------------------------------------------
   Benchmark                       Time             CPU   Iterations
   -----------------------------------------------------------------
   BM_SendReceiveMessages        583 ms          582 ms            1
   
   Process finished with exit code 0
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org