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

Unix timestamp in stats/requests #332

Closed
ghost opened this issue Sep 2, 2015 · 5 comments
Closed

Unix timestamp in stats/requests #332

ghost opened this issue Sep 2, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 2, 2015

I'm polling the JSON block in stats/requests, but I'm creating my own Unix time:
https://github.com/bbc/locust-load-tests/blob/master/tests/lib/stats.py#L30

I wondered if you can add the Unix time to the API to avoid any time lag issues that may occur.

@vividhsv
Copy link

vividhsv commented Sep 3, 2015

Yes, It would help if Unix time stamps are added.

As a work around you can also listen for slave_report event and collect the stats directly from slaves and push them to Graphite or Influx. Since the Slaves send stats with timestamp you wont have any time lag issues. (NOTE: This works only with distributed setup). We have used this in our test setup and works without any issues.

Here is a sample from my code
https://gist.github.com/vividhsv/5139c37d267330236dbe

I got this idea from https://github.com/pglass/designate-locust/blob/master/graphite_client.py
and here is a thread from him or her on the same #144 (comment)

10_2_x

@ghost
Copy link
Author

ghost commented Sep 3, 2015

Hi @vividhsv

Could you add the sample code please?

@vividhsv
Copy link

vividhsv commented Sep 3, 2015

Sorry, edited the commet above ..Hope it helps.

@ghost
Copy link
Author

ghost commented Sep 3, 2015

Thanks for the example.

@cgoldberg
Copy link
Member

nice!

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

4 participants