You've already forked pgbackrest
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:
@ -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()));
|
||||
|
Reference in New Issue
Block a user