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

Number of measurements in InfluxDB is less then in result.json #31

Open
ziganow opened this issue Apr 22, 2024 · 5 comments
Open

Number of measurements in InfluxDB is less then in result.json #31

ziganow opened this issue Apr 22, 2024 · 5 comments

Comments

@ziganow
Copy link

ziganow commented Apr 22, 2024

Hi,
I'am wondering why the number of record during the testrun differ from the report summary of k6 itself and also differ from json result output. There are always less records in InfluxDB.
My Last run:
K6 excerpt
http_reqs......................: 29500 132.648204/s

JQ Query:
jq '. | select(.type=="Point" and .metric == "http_reqs" and .data.tags.testrun == "20240422145315" ) | .data.value' script_results.json | jq -s "length"
29500

Influx Flux Query:
from(bucket: "k6")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "http_reqs")
|> filter(fn: (r) => r["_field"] == "value")
|> filter(fn: (r) => r["testrun"] == "20240422145315")
|> group()
|> count()
|> yield(name: "mean")

29268 ---> missing 232 records

Any idea what is going wrong here?

Kind Regards
Alexey

@mstoykov
Copy link
Contributor

Thanks for reporting this and the inclusion of the queries. 🙇

Did you have the following line in the The flush operation took higher than the expected set push interval. Or any other warning during the test run ?

Also have you tried with bigger time range in influxdb as it might turn out you just "cropped" the last few requests?

@marijamitevska-rldatix
Copy link

Hello! I encountered the same issue, and wrote about it in the Grafana Community. The reason in my case was the difference in time precision between Go and Windows, as I was running the tests on Windows. How do you run your tests?

@ziganow
Copy link
Author

ziganow commented Apr 23, 2024 via email

@ziganow
Copy link
Author

ziganow commented Apr 23, 2024 via email

@mstoykov
Copy link
Contributor

If you are correct than this is the same problem as @marijamitevska-rldatix - your timestamp for a given sample matches exactly another one(among the others).

AFAIK the only solution for this will be to aggregate samples, and AFAIK this is not planned to be worked on for this extension.

Also AFAIK it won't be backwards compatible so it likely will need to either bump a major version or be a separate project.

cc @codebien

@mstoykov mstoykov removed the triage label Apr 23, 2024
@mstoykov mstoykov removed their assignment Apr 23, 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

No branches or pull requests

3 participants