diff options
| author | Dan Engelbrecht <[email protected]> | 2023-10-30 18:29:09 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-30 18:29:09 +0100 |
| commit | cbdda104ada38108700f9da5b192867d83074119 (patch) | |
| tree | 98c04b344e041c156fdc1a5c393672bef743be34 /src/zen/cmds/admin_cmd.cpp | |
| parent | fix changelog (diff) | |
| download | archived-zen-cbdda104ada38108700f9da5b192867d83074119.tar.xz archived-zen-cbdda104ada38108700f9da5b192867d83074119.zip | |
individual gc stats (#506)
- Feature: New parameter for endpoint `admin/gc` (GET) `details=true` which gives details stats on GC operation when using GC V2
- Feature: New options for zen command `gc-status`
- `--details` that enables the detailed output from the last GC operation when using GC V2
Diffstat (limited to 'src/zen/cmds/admin_cmd.cpp')
| -rw-r--r-- | src/zen/cmds/admin_cmd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zen/cmds/admin_cmd.cpp b/src/zen/cmds/admin_cmd.cpp index 209390e2a..8b8b416ba 100644 --- a/src/zen/cmds/admin_cmd.cpp +++ b/src/zen/cmds/admin_cmd.cpp @@ -183,6 +183,7 @@ GcStatusCommand::GcStatusCommand() { m_Options.add_options()("h,help", "Print help"); m_Options.add_option("", "u", "hosturl", "Host URL", cxxopts::value(m_HostName)->default_value(""), "<hosturl>"); + m_Options.add_option("", "d", "details", "Show detailed GC report", cxxopts::value(m_Details)->default_value("false"), "<details>"); } GcStatusCommand::~GcStatusCommand() @@ -209,6 +210,10 @@ GcStatusCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) cpr::Session Session; Session.SetHeader(cpr::Header{{"Accept", "application/json"}}); Session.SetUrl({fmt::format("{}/admin/gc", m_HostName)}); + if (m_Details) + { + Session.SetParameters({{"details", "true"}}); + } cpr::Response Result = Session.Get(); |