aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-24 21:39:33 +0200
committerGitHub Enterprise <[email protected]>2025-10-24 21:39:33 +0200
commitcb86c1f0bc1cf14f869820d56895671dffcb7f82 (patch)
treedd9a2ee98e9d7f918d68b01652d1d19a39285104 /src/zenstore/gc.cpp
parentmove cpr in-tree (#605) (diff)
downloadzen-cb86c1f0bc1cf14f869820d56895671dffcb7f82.tar.xz
zen-cb86c1f0bc1cf14f869820d56895671dffcb7f82.zip
fix gc disk load graph (#610)
* make sure our gc disk load graph includes the latest measurement value
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index b17103e43..c05cb5269 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -2300,7 +2300,7 @@ GcScheduler::SchedulerThread()
uint64_t MaxLoad = 0;
{
- const GcClock::Tick EpochTickCount = GcClock::Now().time_since_epoch().count();
+ const GcClock::Tick EpochTickCount = Now.time_since_epoch().count();
std::unique_lock Lock(m_GcMutex);
if (AreDiskWritesAllowed())
{
@@ -2310,8 +2310,8 @@ GcScheduler::SchedulerThread()
const GcClock::TimePoint LoadGraphStartTime = Now - LoadGraphTime;
const GcClock::Tick Start = LoadGraphStartTime.time_since_epoch().count();
const GcClock::Tick End = Now.time_since_epoch().count();
- DiskDeltas = m_DiskUsageWindow.GetDiskDeltas(Start,
- End,
+ DiskDeltas = m_DiskUsageWindow.GetDiskDeltas(Start + 1,
+ End + 1,
Max(1, (End - Start + PressureGraphLength - 1) / PressureGraphLength),
MaxLoad);
}