Skip to content

Commit 5d96740

Browse files
spikehmeta-codesync[bot]
authored andcommitted
StressTest: format files
Summary: It's annoying that they don't auto format in VS Code anymore since being moved to `xplat/`. :/ Manually invoke the formatter. Only formatting changes. Differential Revision: D86906743 fbshipit-source-id: 4184a27f77f8238111a6851a971dafc9d853fc57
1 parent 1f7374c commit 5d96740

4 files changed

Lines changed: 29 additions & 15 deletions

File tree

third-party/thrift/src/thrift/conformance/stresstest/client/ClientFactory.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,9 @@ folly::AsyncTransport::UniquePtr createQuicSocket(
201201
.setFizzClientContext(getFizzContext(cfg))
202202
.setCertificateVerifier(getFizzVerifier(cfg))
203203
.build());
204-
quicClient->setPacingTimer(std::make_shared<quic::HighResQuicTimer>(
205-
evb, std::chrono::microseconds(200)));
204+
quicClient->setPacingTimer(
205+
std::make_shared<quic::HighResQuicTimer>(
206+
evb, std::chrono::microseconds(200)));
206207
quicClient->setTransportSettings(ts);
207208
quicClient->addNewPeerAddress(cfg.serverHost);
208209
auto quicAsyncTransport = new quic::QuicClientAsyncTransport(quicClient);
@@ -326,8 +327,9 @@ THRIFT_PLUGGABLE_FUNC_REGISTER(
326327
std::shared_ptr<StressTestAsyncClient> connection =
327328
ClientFactory::createRocketClient(evb, cfg.connConfig);
328329
for (size_t i = 0; i < cfg.numClientsPerConnection; i++) {
329-
clients.emplace_back(std::make_unique<ThriftStressTestClient>(
330-
connection, stats, cfg.enableChecksum));
330+
clients.emplace_back(
331+
std::make_unique<ThriftStressTestClient>(
332+
connection, stats, cfg.enableChecksum));
331333
}
332334
}
333335
return clients;

third-party/thrift/src/thrift/conformance/stresstest/client/ClientRunner.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,17 @@ ClientRunner::ClientRunner(const ClientConfig& config)
228228
: continuous_(config.continuous),
229229
useLoadGenerator_(config.useLoadGenerator),
230230
clientThreads_() {
231-
rocket::THRIFT_FLAG_SET_MOCK(rocket_enable_frame_relative_alignment, config.enableRocketFrameRelativeAlignment);
231+
rocket::THRIFT_FLAG_SET_MOCK(
232+
rocket_enable_frame_relative_alignment,
233+
config.enableRocketFrameRelativeAlignment);
232234
auto targetQpsPerClient = config.targetQps / config.numClientThreads;
233235
for (size_t i = 0; i < config.numClientThreads; i++) {
234-
loadGenerator_.emplace_back(std::make_unique<PoissonLoadGenerator>(
235-
targetQpsPerClient, config.gen_load_interval));
236-
clientThreads_.emplace_back(std::make_unique<ClientThread>(
237-
config, i, *loadGenerator_[i], config.useLoadGenerator));
236+
loadGenerator_.emplace_back(
237+
std::make_unique<PoissonLoadGenerator>(
238+
targetQpsPerClient, config.gen_load_interval));
239+
clientThreads_.emplace_back(
240+
std::make_unique<ClientThread>(
241+
config, i, *loadGenerator_[i], config.useLoadGenerator));
238242
}
239243
}
240244

third-party/thrift/src/thrift/conformance/stresstest/client/StressTestClient.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,17 @@ folly::coro::Task<void> ThriftStressTestClient::timedExecute(Fn&& fn) {
197197

198198
folly::coro::Task<void> ThriftStressTestClient::co_alignedRequestResponseEb(
199199
RpcOptions& rpcOptions, AlignedResponse& resp, const AlignedRequest& req) {
200-
co_await timedExecute([&]() -> folly::coro::Task<void> { resp = co_await client_->co_alignedRequestResponseEb(rpcOptions, req); });
200+
co_await timedExecute([&]() -> folly::coro::Task<void> {
201+
resp = co_await client_->co_alignedRequestResponseEb(rpcOptions, req);
202+
});
201203
}
202204

203205
folly::coro::Task<void> ThriftStressTestClient::co_alignedRequestResponseTm(
204206
RpcOptions& rpcOptions, AlignedResponse& resp, const AlignedRequest& req) {
205207
AlignedResponse ret;
206-
co_await timedExecute([&]() -> folly::coro::Task<void> { resp = co_await client_->co_alignedRequestResponseTm(rpcOptions, req); });
208+
co_await timedExecute([&]() -> folly::coro::Task<void> {
209+
resp = co_await client_->co_alignedRequestResponseTm(rpcOptions, req);
210+
});
207211
}
208212

209213
} // namespace apache::thrift::stress

third-party/thrift/src/thrift/conformance/stresstest/client/StressTestClient.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ class StressTestClient {
5050
virtual folly::coro::Task<void> co_streamTm(const StreamRequest&) = 0;
5151
virtual folly::coro::Task<void> co_sinkTm(const StreamRequest&) = 0;
5252
virtual folly::coro::Task<double> co_calculateSquares(int32_t) = 0;
53-
virtual folly::coro::Task<void> co_alignedRequestResponseEb(RpcOptions&, AlignedResponse&, const AlignedRequest&) = 0;
54-
virtual folly::coro::Task<void> co_alignedRequestResponseTm(RpcOptions&, AlignedResponse&, const AlignedRequest&) = 0;
53+
virtual folly::coro::Task<void> co_alignedRequestResponseEb(
54+
RpcOptions&, AlignedResponse&, const AlignedRequest&) = 0;
55+
virtual folly::coro::Task<void> co_alignedRequestResponseTm(
56+
RpcOptions&, AlignedResponse&, const AlignedRequest&) = 0;
5557

5658
bool connectionGood() const { return connectionGood_; }
5759

@@ -89,9 +91,11 @@ class ThriftStressTestClient : public StressTestClient {
8991

9092
folly::coro::Task<double> co_calculateSquares(int32_t) override;
9193

92-
folly::coro::Task<void> co_alignedRequestResponseEb(RpcOptions&, AlignedResponse&, const AlignedRequest&) override;
94+
folly::coro::Task<void> co_alignedRequestResponseEb(
95+
RpcOptions&, AlignedResponse&, const AlignedRequest&) override;
9396

94-
folly::coro::Task<void> co_alignedRequestResponseTm(RpcOptions&, AlignedResponse&, const AlignedRequest&) override;
97+
folly::coro::Task<void> co_alignedRequestResponseTm(
98+
RpcOptions&, AlignedResponse&, const AlignedRequest&) override;
9599

96100
private:
97101
template <class Fn>

0 commit comments

Comments
 (0)