Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-147: show the correct response with milliseconds precision #155

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

dmitryk-dk
Copy link
Contributor

@dmitryk-dk dmitryk-dk commented Dec 11, 2024

Return timestamps with nanoseconds because VLogs returns it.
I used our sandbox with the next request

curl 'http://localhost:9428/select/logsql/stats_query_range?end=1733187154&query=%2A+%7C+stats+count%28%29&start=1733187134&step=10ms'

Result

{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"count(*)"},"values":[[1733187134,"58"],[1733187134.26,"1"],[1733187134.32,"2"],[1733187134.4499998,"1"],[1733187134.47,"1"],[1733187134.48,"1"],[1733187134.4899998,"1"],[1733187134.5100002,"1"],[1733187134.7,"1"],[1733187134.7299998,"1"],[1733187134.7500002,"2"],[1733187134.77,"1"],[1733187134.82,"1"],[1733187134.84,"1"],[1733187134.91,"2"],[1733187135,"57"],[1733187135.26,"1"],[1733187135.32,"2"],[1733187135.4499998,"1"],[1733187135.47,"1"],[1733187135.48,"1"],[1733187135.4899998,"1"],[1733187135.5100002,"1"],[1733187135.7,"1"],[1733187135.7299998,"1"],[1733187135.7500002,"2"],[1733187135.77,"1"],[1733187135.82,"1"],[1733187135.84,"1"],[1733187135.91,"2"],[1733187136,"74"],[1733187136.08,"2"],[1733187136.26,"1"],[1733187136.32,"2"],[1733187136.33,"1"],[1733187136.4499998,"1"],[1733187136.47,"1"],[1733187136.48,"1"],[1733187136.4899998,"1"],[1733187136.5100002,"1"],[1733187136.7,"1"],[1733187136.7299998,"1"],[1733187136.7500002,"2"],[1733187136.77,"1"],[1733187136.81,"1"],[1733187136.82,"1"],[1733187136.84,"1"],[1733187136.91,"2"],[1733187137,"58"],[1733187137.2099998,"1"],[1733187137.26,"1"],[1733187137.32,"2"],[1733187137.4499998,"1"],[1733187137.47,"1"],[1733187137.48,"1"],[1733187137.4899998,"1"],[1733187137.5100002,"1"],[1733187137.7,"1"],[1733187137.7299998,"1"],[1733187137.7500002,"2"],[1733187137.77,"1"],[1733187137.82,"1"],[1733187137.84,"1"],[1733187137.91,"2"],[1733187138,"62"],[1733187138.26,"1"],[1733187138.32,"2"],[1733187138.4499998,"1"],[1733187138.47,"1"],[1733187138.48,"1"],[1733187138.4899998,"1"],[1733187138.5100002,"1"],[1733187138.7,"1"],[1733187138.7299998,"1"],[1733187138.7500002,"2"],[1733187138.77,"1"],[1733187138.81,"1"],[1733187138.82,"1"],[1733187138.84,"1"],[1733187138.91,"2"],[1733187139,"43"],[1733187139.26,"1"],[1733187139.32,"2"],[1733187139.4499998,"1"],[1733187139.47,"1"],[1733187139.48,"1"],[1733187139.4899998,"1"],[1733187139.5100002,"1"],[1733187139.7,"1"],[1733187139.7299998,"1"],[1733187139.7500002,"2"],[1733187139.77,"1"],[1733187139.82,"1"],[1733187139.84,"1"],[1733187139.91,"2"],[1733187140,"65"],[1733187140.22,"2"],[1733187140.26,"1"],[1733187140.2700002,"1"],[1733187140.32,"2"],[1733187140.4499998,"1"],[1733187140.47,"1"],[1733187140.48,"1"],[1733187140.4899998,"1"],[1733187140.5100002,"1"],[1733187140.7,"1"],[1733187140.7299998,"1"],[1733187140.7500002,"2"],[1733187140.77,"1"],[1733187140.82,"1"],[1733187140.84,"1"],[1733187140.91,"2"],[1733187141,"60"],[1733187141.26,"1"],[1733187141.32,"2"],[1733187141.33,"1"],[1733187141.46,"1"],[1733187141.47,"1"],[1733187141.48,"1"],[1733187141.4899998,"1"],[1733187141.5100002,"1"],[1733187141.7,"1"],[1733187141.7299998,"1"],[1733187141.7500002,"2"],[1733187141.77,"1"],[1733187141.81,"1"],[1733187141.82,"1"],[1733187141.84,"1"],[1733187141.91,"2"],[1733187142,"51"],[1733187142.2099998,"1"],[1733187142.26,"1"],[1733187142.32,"2"],[1733187142.4499998,"1"],[1733187142.47,"1"],[1733187142.4899998,"2"],[1733187142.5100002,"1"],[1733187142.7,"1"],[1733187142.7299998,"1"],[1733187142.7500002,"2"],[1733187142.77,"1"],[1733187142.82,"1"],[1733187142.84,"1"],[1733187142.91,"2"],[1733187143,"60"],[1733187143.26,"1"],[1733187143.32,"2"],[1733187143.4499998,"1"],[1733187143.47,"1"],[1733187143.48,"1"],[1733187143.4899998,"1"],[1733187143.5100002,"1"],[1733187143.7,"1"],[1733187143.7299998,"1"],[1733187143.7500002,"2"],[1733187143.77,"1"],[1733187143.81,"1"],[1733187143.82,"1"],[1733187143.84,"1"],[1733187143.91,"2"],[1733187144,"80"],[1733187144.26,"1"],[1733187144.32,"2"],[1733187144.4499998,"1"],[1733187144.47,"1"],[1733187144.48,"1"],[1733187144.4899998,"1"],[1733187144.5100002,"1"],[1733187144.7,"1"],[1733187144.7299998,"1"],[1733187144.7500002,"2"],[1733187144.77,"1"],[1733187144.82,"1"],[1733187144.84,"1"],[1733187144.85,"2"],[1733187144.91,"2"],[1733187145,"57"],[1733187145.26,"1"],[1733187145.28,"2"],[1733187145.32,"2"],[1733187145.4499998,"1"],[1733187145.48,"2"],[1733187145.4899998,"1"],[1733187145.5100002,"1"],[1733187145.7,"1"],[1733187145.7299998,"1"],[1733187145.7500002,"2"],[1733187145.77,"1"],[1733187145.82,"1"],[1733187145.84,"1"],[1733187145.91,"2"],[1733187146,"59"],[1733187146.08,"2"],[1733187146.26,"1"],[1733187146.32,"2"],[1733187146.33,"1"],[1733187146.4499998,"1"],[1733187146.47,"1"],[1733187146.48,"1"],[1733187146.4899998,"1"],[1733187146.5100002,"1"],[1733187146.7,"1"],[1733187146.7299998,"1"],[1733187146.7500002,"2"],[1733187146.77,"1"],[1733187146.81,"1"],[1733187146.82,"1"],[1733187146.84,"1"],[1733187146.91,"2"],[1733187147,"56"],[1733187147.2099998,"1"],[1733187147.26,"1"],[1733187147.32,"2"],[1733187147.4499998,"1"],[1733187147.47,"1"],[1733187147.48,"1"],[1733187147.4899998,"1"],[1733187147.5100002,"1"],[1733187147.7,"1"],[1733187147.7299998,"1"],[1733187147.7500002,"2"],[1733187147.77,"1"],[1733187147.82,"1"],[1733187147.84,"1"],[1733187147.91,"2"],[1733187148,"27"],[1733187148.26,"1"],[1733187148.32,"2"],[1733187148.46,"1"],[1733187148.47,"1"],[1733187148.48,"1"],[1733187148.4899998,"1"],[1733187148.5100002,"1"],[1733187148.7,"1"],[1733187148.7299998,"1"],[1733187148.7500002,"2"],[1733187148.77,"1"],[1733187148.82,"2"],[1733187148.84,"1"],[1733187148.91,"2"],[1733187149,"54"],[1733187149.26,"1"],[1733187149.32,"2"],[1733187149.4499998,"1"],[1733187149.47,"1"],[1733187149.48,"1"],[1733187149.4899998,"1"],[1733187149.5100002,"1"],[1733187149.7,"1"],[1733187149.7299998,"1"],[1733187149.7500002,"2"],[1733187149.77,"1"],[1733187149.82,"1"],[1733187149.84,"1"],[1733187149.86,"2"],[1733187149.91,"2"],[1733187150,"71"],[1733187150.26,"1"],[1733187150.32,"2"],[1733187150.4499998,"1"],[1733187150.47,"1"],[1733187150.48,"1"],[1733187150.4899998,"1"],[1733187150.5100002,"1"],[1733187150.7,"1"],[1733187150.7299998,"1"],[1733187150.7500002,"2"],[1733187150.77,"1"],[1733187150.82,"1"],[1733187150.84,"1"],[1733187150.91,"2"],[1733187151,"70"],[1733187151.26,"1"],[1733187151.32,"2"],[1733187151.33,"1"],[1733187151.4499998,"5"],[1733187151.47,"1"],[1733187151.4899998,"1"],[1733187151.5100002,"1"],[1733187151.52,"1"],[1733187151.7,"1"],[1733187151.7299998,"1"],[1733187151.7500002,"2"],[1733187151.77,"1"],[1733187151.81,"1"],[1733187151.82,"1"],[1733187151.84,"1"],[1733187151.91,"2"],[1733187152,"77"],[1733187152.2099998,"1"],[1733187152.26,"1"],[1733187152.32,"1"],[1733187152.34,"1"],[1733187152.4499998,"1"],[1733187152.47,"1"],[1733187152.4899998,"2"],[1733187152.5100002,"1"],[1733187152.7,"1"],[1733187152.7299998,"1"],[1733187152.7500002,"2"],[1733187152.77,"1"],[1733187152.82,"1"],[1733187152.84,"1"],[1733187152.91,"2"],[1733187153,"51"],[1733187153.26,"1"],[1733187153.32,"2"],[1733187153.4499998,"1"],[1733187153.47,"1"],[1733187153.4899998,"2"],[1733187153.5100002,"1"],[1733187153.7,"1"],[1733187153.7299998,"1"],[1733187153.7500002,"2"],[1733187153.77,"1"],[1733187153.82,"2"],[1733187153.84,"1"],[1733187153.91,"2"],[1733187154,"64"]]}]}
Screenshot 2024-12-11 at 18 56 03

Related issue: #147

Loori-R
Loori-R previously approved these changes Dec 11, 2024
Copy link
Contributor

@Loori-R Loori-R left a comment

Choose a reason for hiding this comment

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

LGTM!

Loori-R
Loori-R previously approved these changes Dec 12, 2024
pkg/plugin/response.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
hagen1778
hagen1778 previously approved these changes Dec 12, 2024
pkg/plugin/response.go Outdated Show resolved Hide resolved
pkg/plugin/response.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@dmitryk-dk dmitryk-dk merged commit d241fb3 into main Dec 12, 2024
6 checks passed
@dmitryk-dk dmitryk-dk deleted the issue-147 branch December 12, 2024 11:42
@dmitryk-dk dmitryk-dk changed the title issue-147: show the correct response with nanosecond precision issue-147: show the correct response with milliseconds precision Dec 12, 2024
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.

3 participants