Avoid Benchmarking Allocs
@ -80,8 +80,11 @@ class Server {
return false;
}
payload->set_type(type);
std::unique_ptr<char[]> body(new char[size]());
// Don't waste time creating a new payload of identical size.
payload->set_body(body.get(), size);
if (payload->body().length() != (size_t)size) {
return true;