[
https://issues.apache.org/jira/browse/DISPATCH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17382791#comment-17382791
]
ASF GitHub Bot commented on DISPATCH-2200:
------------------------------------------
jiridanek commented on a change in pull request #1303:
URL: https://github.com/apache/qpid-dispatch/pull/1303#discussion_r671813088
##########
File path: tests/c_benchmarks/bm_tcp_adapter.cpp
##########
@@ -103,3 +221,143 @@ static void
BM_TCPEchoServerLatencyWithoutQDR(benchmark::State &state)
}
BENCHMARK(BM_TCPEchoServerLatencyWithoutQDR)->Unit(benchmark::kMillisecond);
+
+class DispatchRouterThreadTCPLatencyTest
+{
+ QDR mQdr{};
+ std::thread mT;
+
+ public:
+ DispatchRouterThreadTCPLatencyTest(const std::string configName)
+ {
+ Latch mx;
+
+ mT = std::thread([&mx, this, &configName]() {
+ mQdr.initialize(configName);
+ mQdr.wait();
+
+ mx.notify();
+ mQdr.run();
+
+ mQdr.deinitialize(false);
+ });
+
+ mx.wait();
+ }
+
+ ~DispatchRouterThreadTCPLatencyTest()
+ {
+ mQdr.stop();
+ mT.join();
+ }
+};
+
+class DispatchRouterSubprocessTcpLatencyTest
+{
+ int pid;
+
+ public:
+ DispatchRouterSubprocessTcpLatencyTest(std::string configName)
+ {
+ pid = fork();
Review comment:
I really like this! Since dispatch is compiled in, it can be exec'd by
forking the test/benchmark process. With (considerable) work, it would be
possible to even have two-way interactions with the forked process, using some
Linux IPC... Just running qdmanage is simpler and probably better, though.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> TCP adaptor microbenchmark test with a pass/fail condition
> ----------------------------------------------------------
>
> Key: DISPATCH-2200
> URL: https://issues.apache.org/jira/browse/DISPATCH-2200
> Project: Qpid Dispatch
> Issue Type: Test
> Components: Protocol Adaptors, Tests
> Reporter: Jiri Daněk
> Priority: Major
>
> Some aspects of performance of the TCP adaptor can be effectively tested by
> measuring an end-to-end latency of a TCP send.
> When each send is done after the previous send finished, this gives a
> measurement of the lowest latency possible under the most ideal conditions.
> Such benchmark focuses on the speed of the happy path under no contention and
> the lowest possible load.
> When the transfers happen over localhost, impact of most of networking is
> eliminated and the test measures impact of dispatch code exclusively.
> The pass fail condition was previously discussed in comments for
> https://github.com/apache/qpid-dispatch/pull/1296
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]