aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/upstream/jupiter.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-10 13:50:09 +0200
committerGitHub Enterprise <[email protected]>2024-04-10 13:50:09 +0200
commit1143af52ae1924b6e2cad347924bad578dda5391 (patch)
tree3caa74260f0ef753c4b0da4bf17153d0017e6b2c /src/zenserver/upstream/jupiter.cpp
parentchangelog (diff)
downloadzen-1143af52ae1924b6e2cad347924bad578dda5391.tar.xz
zen-1143af52ae1924b6e2cad347924bad578dda5391.zip
remote project store stats (#44)
* add remote oplog store statistics * block chunking when uploading oplog to zenserver (mirroring) * make sure we can move temporary dechunked file into cas store
Diffstat (limited to 'src/zenserver/upstream/jupiter.cpp')
-rw-r--r--src/zenserver/upstream/jupiter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/zenserver/upstream/jupiter.cpp b/src/zenserver/upstream/jupiter.cpp
index c77834657..3e477f053 100644
--- a/src/zenserver/upstream/jupiter.cpp
+++ b/src/zenserver/upstream/jupiter.cpp
@@ -35,20 +35,25 @@ namespace detail {
{
if (Response.Error)
{
- return {.ElapsedSeconds = Response.ElapsedSeconds,
+ return {.SentBytes = gsl::narrow<uint64_t>(Response.UploadedBytes),
+ .ReceivedBytes = gsl::narrow<uint64_t>(Response.DownloadedBytes),
+ .ElapsedSeconds = Response.ElapsedSeconds,
.ErrorCode = Response.Error.value().ErrorCode,
.Reason = Response.ErrorMessage(ErrorPrefix),
.Success = false};
}
if (!Response.IsSuccess())
{
- return {.ElapsedSeconds = Response.ElapsedSeconds,
+ return {.SentBytes = gsl::narrow<uint64_t>(Response.UploadedBytes),
+ .ReceivedBytes = gsl::narrow<uint64_t>(Response.DownloadedBytes),
+ .ElapsedSeconds = Response.ElapsedSeconds,
.ErrorCode = static_cast<int32_t>(Response.StatusCode),
.Reason = Response.ErrorMessage(ErrorPrefix),
.Success = false};
}
return {.Response = Response.ResponsePayload,
- .Bytes = Response.DownloadedBytes,
+ .SentBytes = gsl::narrow<uint64_t>(Response.UploadedBytes),
+ .ReceivedBytes = gsl::narrow<uint64_t>(Response.DownloadedBytes),
.ElapsedSeconds = Response.ElapsedSeconds,
.ErrorCode = 0,
.Success = true};