Skip to content

Conversation

@janeklb
Copy link
Contributor

@janeklb janeklb commented Nov 17, 2025

Motivation:

The log messages produced by Client.java (v2) include a duration, but since it is in nanoseconds it is hard to read / interpret.

for example

Query request failed after attempts: 1 - Duration: 2784541

and 2784541 is 2ms

Modification:
Log the ISO-8601 format of a duration (via Duration#toString()) when logging durations in Client.java

so above would be

Query request failed after attempts: 1 - Duration: PT0.002784541S

Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

Co-authored-by: windsurf-bot[bot] <189301087+windsurf-bot[bot]@users.noreply.github.com>
@janeklb
Copy link
Contributor Author

janeklb commented Nov 17, 2025

I see there is a StopWatch.java -- i could use this instead if you think it would be better (although that seems to be meant specifically for metrics as it is

public class StopWatch implements Metric {

@chernser
Copy link
Contributor

Thank you, @janeklb !
The PR looks good.

@chernser
Copy link
Contributor

As for StopWatch I would wait. It was added to cover very simple case.
We need to review metrics parts and build a complete observability solution.

@chernser chernser merged commit 5e843af into ClickHouse:main Nov 21, 2025
17 of 20 checks passed
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