1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Return stats as a JSON string rather than a KeyValue object.

There is no need to process the stats so a KeyValue is overkill.

Also remove the performance tests that check the stat totals since this is covered in the unit tests.
This commit is contained in:
David Steele
2022-04-14 20:34:42 -04:00
parent e1ce731f8a
commit d103dd6238
7 changed files with 35 additions and 39 deletions

View File

@ -207,10 +207,10 @@ cmdEnd(int code, const String *errorMessage)
MEM_CONTEXT_TEMP_BEGIN()
{
// Output statistics if there are any
const KeyValue *statKv = statToKv();
const String *const statJson = statToJson();
if (!varLstEmpty(kvKeyList(statKv)))
LOG_DETAIL_FMT("statistics: %s", strZ(jsonFromKv(statKv)));
if (statJson != NULL)
LOG_DETAIL_FMT("statistics: %s", strZ(statJson));
// Basic info on command end
String *info = strCatFmt(strNew(), "%s command end: ", strZ(cfgCommandRoleName()));