aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/filebuildstorage.cpp
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2025-04-24 08:39:27 -0600
committerGitHub Enterprise <[email protected]>2025-04-24 08:39:27 -0600
commita4edfb0a389fe409d48b926a375a6d43015d9ce1 (patch)
treecb4a0e84a0381e9b4a087401037ba5837e8e65d7 /src/zenutil/filebuildstorage.cpp
parent5.6.6-pre1 (diff)
parentMerge branch 'main' into zs/zencli-list-namespaces-buckets (diff)
downloadzen-a4edfb0a389fe409d48b926a375a6d43015d9ce1.tar.xz
zen-a4edfb0a389fe409d48b926a375a6d43015d9ce1.zip
Merge pull request #360 from ue-foundation/zs/zencli-list-namespaces-buckets
Zs/zencli list namespaces buckets
Diffstat (limited to 'src/zenutil/filebuildstorage.cpp')
-rw-r--r--src/zenutil/filebuildstorage.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/zenutil/filebuildstorage.cpp b/src/zenutil/filebuildstorage.cpp
index f335a03a3..badfb4840 100644
--- a/src/zenutil/filebuildstorage.cpp
+++ b/src/zenutil/filebuildstorage.cpp
@@ -35,6 +35,27 @@ public:
virtual ~FileBuildStorage() {}
+ virtual CbObject ListNamespaces(bool bRecursive) override
+ {
+ ZEN_TRACE_CPU("FileBuildStorage::ListNamespaces");
+ ZEN_UNUSED(bRecursive);
+
+ SimulateLatency(0, 0);
+
+ Stopwatch ExecutionTimer;
+ auto _ = MakeGuard([&]() { m_Stats.TotalExecutionTimeUs += ExecutionTimer.GetElapsedTimeUs(); });
+ m_Stats.TotalRequestCount++;
+
+ CbObjectWriter Writer;
+ Writer.BeginArray("results");
+ {
+ }
+ Writer.EndArray(); // results
+ Writer.Save();
+ SimulateLatency(Writer.GetSaveSize(), 0);
+ return Writer.Save();
+ }
+
virtual CbObject ListBuilds(CbObject Query) override
{
ZEN_TRACE_CPU("FileBuildStorage::ListBuilds");
@@ -66,7 +87,7 @@ public:
}
}
}
- Writer.EndArray(); // builds
+ Writer.EndArray(); // results
Writer.Save();
SimulateLatency(Writer.GetSaveSize(), 0);
return Writer.Save();