mirror of https://github.com/qt/qtgrpc.git
grpc benchmarks: fix compiler warnings
Fix unused variables and add missing include Pick-to: 6.10 6.9 6.8 Change-Id: Idc756938daa63a9cfd4d336598c7919de999a888 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
eb703a45a1
commit
bd1fccb26a
|
|
@ -77,10 +77,10 @@ public:
|
|||
new BiDiStreaming(cq.get(), &mService);
|
||||
}
|
||||
}
|
||||
// Two threads per CQ for reducing bursts in queries.
|
||||
|
||||
for (auto& cq : mCompletionQueues) {
|
||||
mThreads.emplace_back([this, cq = cq.get()] { processRPCs(cq); });
|
||||
// mThreads.emplace_back([this, cq = cq.get()] { processRPCs(cq); });
|
||||
mThreads.emplace_back([cq = cq.get()] { processRPCs(cq); });
|
||||
// Add more threads for parallel RPC processing.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ void AsyncGrpcClientBenchmark::bidiStreaming()
|
|||
}
|
||||
return false;
|
||||
};
|
||||
call->callHandler = [this, call](bool ok) {
|
||||
call->callHandler = [call](bool ok) {
|
||||
if (ok) {
|
||||
call->stream->Finish(&call->status, &call->finishHandler);
|
||||
call->stream->Read(&call->response, &call->readHandler);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void QtGrpcClientBenchmark::bidiStreaming()
|
|||
});
|
||||
|
||||
QObject::connect(streamPtr, &QGrpcBidiStream::messageReceived, this,
|
||||
[this, stream = streamPtr, &response, &request, &benchData]() {
|
||||
[this, stream = streamPtr, &response, &benchData]() {
|
||||
if (stream->read(&response)) {
|
||||
if (response.hasPayload())
|
||||
benchData.receivedBytes += response.payload().size();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <concepts>
|
||||
#include <cstdlib>
|
||||
#include <format>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <ranges>
|
||||
#include <string_view>
|
||||
|
|
|
|||
Loading…
Reference in New Issue