Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rimbi committed Jul 10, 2024
1 parent 0e9c821 commit b3f436b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bin/pgcopydb/summary.c
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,10 @@ catalog_timing_fetch(SQLiteQuery *query)
timing->doneTime = sqlite3_column_int64(query->ppStmt, 3);
timing->durationMs = sqlite3_column_int64(query->ppStmt, 4);

/*
* Skip reading `ppDuration` from DB and create it from `durationMs`
* in accordance with the single source of truth
*/
if (timing->durationMs > 0)
{
IntervalToString(timing->durationMs,
Expand All @@ -2332,6 +2336,10 @@ catalog_timing_fetch(SQLiteQuery *query)
timing->count = sqlite3_column_int64(query->ppStmt, 5);
timing->bytes = sqlite3_column_int64(query->ppStmt, 6);

/*
* Skip reading `ppBytes` from DB and create it from `bytes`
* in accordance with the single source of truth
*/
if (timing->bytes > 0)
{
pretty_print_bytes(timing->ppBytes,
Expand Down

0 comments on commit b3f436b

Please sign in to comment.