Skip to content

[BugFix] fix the time measurement of run_queries.sh#96

Merged
rschu1ze merged 2 commits intoClickHouse:mainfrom
murphyatwork:murphy_run_queries
Oct 13, 2025
Merged

[BugFix] fix the time measurement of run_queries.sh#96
rschu1ze merged 2 commits intoClickHouse:mainfrom
murphyatwork:murphy_run_queries

Conversation

@murphyatwork
Copy link
Copy Markdown
Contributor

Using mysql -vvv may produce output that isn't recognized by the regex, leading to an empty Response time. To address this, switch to /usr/bin/time for measuring execution time.

--------------
SELECT sleep(60)
--------------

+-----------+
| sleep(60) |
+-----------+
|         1 |
+-----------+
1 row in set (1 min 0.01 sec)

Bye

@murphyatwork murphyatwork changed the title [BugFix] fix the timing of run_queries.sh [BugFix] fix the time measurement of run_queries.sh Oct 10, 2025
@murphyatwork
Copy link
Copy Markdown
Contributor Author

I conducted a cold run test using various EBS specifications for Q2.

  • 500MB/s: 20s
  • 200MB/s: 50s

I didn't run the test on a slower EBS, but it would clearly take more than 60 seconds, potentially causing the exception.

@rschu1ze rschu1ze merged commit 868553e into ClickHouse:main Oct 13, 2025
Comment thread starrocks/run_queries.sh
# Execute the query multiple times
for i in $(seq 1 $TRIES); do
RESP=$(mysql -vvv -h "$DB_HOST" -P "$DB_MYSQL_PORT" -u"$DB_USER" "$DB_NAME" -e "$query" | perl -nle 'print $1 if /\((\d+\.\d+)+ sec\)/' ||:)
RESP=$({ time -f '%e' \
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rschu1ze annually /usr/bin/time is intended , which is different from time function and supports -f option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, thanks.

Fixed here: #97

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we re-run the test to update the results? I believe this will address the query failure issue from last time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #98

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks.
looks like the web page is not correctly updated?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants