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

Commit5515ec0

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 parenta293228 commit5515ec0

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
@@ -1135,11 +1135,12 @@ doCustom(TState *thread, CState *st, instr_time *conn_time, FILE *logfile, AggVa
11351135
* first time it's needed, and reuse the same value throughout this
11361136
* function after that. This also ensures that e.g. the calculated latency
11371137
* reported in the log file and in the totals are the same. Zero means
1138-
* "not set yet".
1138+
* "not set yet". Reset "now" when we step to the next command with "goto
1139+
* top", though.
11391140
*/
1141+
top:
11401142
INSTR_TIME_SET_ZERO(now);
11411143

1142-
top:
11431144
commands=sql_files[st->use_file];
11441145

11451146
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp