Skip to content

Fbthrift sync interface testing - (local deployment)once RPC request lantency is 10ms~100ms #689

@sunshone

Description

@sunshone

fbthrift compile type is Release(--build-type Release).
use fbthrift support example testing(ChatRoomClient.cpp ExampleServer.cpp)

code:
...
auto start = std::chrono::steady_clock::now();
auto start_ms = std::chrono::time_point_caststd::chrono::microseconds(start)
.time_since_epoch()
.count();
client->sync_sendMessage(sendRequest);
auto end = std::chrono::steady_clock::now();
auto end_ms = std::chrono::time_point_caststd::chrono::microseconds(end)
.time_since_epoch()
.count();
auto elapsed = std::chrono::duration_caststd::chrono::microseconds(end - start);
std::cout << elapsed << std::endl;
...

result:
elapsed is 10407µs ~ 100000µs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions