Revert "Remove putBytes"

This reverts commit b8eea7e81a.
This commit is contained in:
Eelco Dolstra 2020-08-04 15:56:10 +02:00
parent 327b1bf378
commit dfe66420e7
2 changed files with 6 additions and 2 deletions

View file

@ -343,10 +343,13 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore
std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1)
.count();
printInfo("uploaded 's3://%s/%s' in %d ms",
bucketName, path, duration);
auto size = istream->tellg();
printInfo("uploaded 's3://%s/%s' (%d bytes) in %d ms",
bucketName, path, size, duration);
stats.putTimeMs += duration;
stats.putBytes += size;
stats.put++;
}

View file

@ -19,6 +19,7 @@ public:
struct Stats
{
std::atomic<uint64_t> put{0};
std::atomic<uint64_t> putBytes{0};
std::atomic<uint64_t> putTimeMs{0};
std::atomic<uint64_t> get{0};
std::atomic<uint64_t> getBytes{0};