in e2e-examples/gcs/benchmark/runner_watcher.cc [32:71]
void RunnerWatcher::NotifyCompleted(OperationType operationType,
int32_t runner_id, int64_t channel_id,
std::string peer, std::string bucket,
std::string object, grpc::Status status,
int64_t bytes, absl::Time time,
absl::Duration elapsed_time,
std::vector<Chunk> chunks) {
Operation op;
op.type = operationType;
op.runner_id = runner_id;
op.channel_id = channel_id;
op.peer = peer;
op.bucket = bucket;
op.object = object;
op.status = status;
op.bytes = bytes;
op.time = time;
op.elapsed_time = elapsed_time;
op.chunks = std::move(chunks);
// Insert records
size_t ord;
{
absl::MutexLock l(&lock_);
operations_.push_back(std::move(op));
ord = operations_.size();
}
if (verbose_) {
auto sec = absl::ToDoubleSeconds(op.elapsed_time);
printf(
"### %sCompleted: ord=%ld time=%s peer=%s bucket=%s object=%s "
"bytes=%lld elapsed=%.2fs%s\n",
ToOperationTypeString(operationType), ord,
absl::FormatTime(absl::RFC3339_sec, time, absl::UTCTimeZone()).c_str(),
peer.c_str(), bucket.c_str(), object.c_str(), (long long)bytes, sec,
ord <= warmups_ ? " [WARM-UP]" : "");
fflush(stdout);
}
}