Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e75be6

Browse files
committed
Fix calculation of latency of pgbench backslash commands.
When we loop back to the top of doCustom after processing a backslashcommand, we must reset the "now" timestamp, because that's used tocalculate the time spent executing the previous command.Report and fix by Fabien Coelho. Backpatch to 9.5, where this was broken.
1 parenta664d47 commit2e75be6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/pgbench/pgbench.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,11 +1154,12 @@ doCustom(TState *thread, CState *st, instr_time *conn_time, FILE *logfile, AggVa
11541154
* first time it's needed, and reuse the same value throughout this
11551155
* function after that. This also ensures that e.g. the calculated latency
11561156
* reported in the log file and in the totals are the same. Zero means
1157-
* "not set yet".
1157+
* "not set yet". Reset "now" when we step to the next command with "goto
1158+
* top", though.
11581159
*/
1160+
top:
11591161
INSTR_TIME_SET_ZERO(now);
11601162

1161-
top:
11621163
commands=sql_files[st->use_file];
11631164

11641165
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp