aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/s3-binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-04 15:56:10 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-04 15:56:10 +0200
commitdfe66420e7e5395acfa8068fafcadc3a38a56184 (patch)
tree0a083228c874c7c74d59f563ec4cc11d3ac2e051 /src/libstore/s3-binary-cache-store.cc
parent327b1bf378ebdfe7acc6357b651470b45cb44472 (diff)
Revert "Remove putBytes"
This reverts commit b8eea7e81af53905be7845dffc6d0a83ea8edc97.
Diffstat (limited to 'src/libstore/s3-binary-cache-store.cc')
-rw-r--r--src/libstore/s3-binary-cache-store.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/s3-binary-cache-store.cc b/src/libstore/s3-binary-cache-store.cc
index 67935f3ba..1b7dff085 100644
--- a/src/libstore/s3-binary-cache-store.cc
+++ b/src/libstore/s3-binary-cache-store.cc
@@ -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++;
}