-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Feature request: Add a timestamp in the JSON output #66
Comments
Doesn't seem like adding a timestamp will help you much though since it seems you'll need to add other things to the JSON too. It would probably be easier for you to use something like https://stedolan.github.io/jq/ |
By adding the timestamp on a fork, works as planned. My goal was, when it starts the Speedtest probing to record the start time, then I process the output to monitoring software, visualizing the data metrics by download/upload per minute. Here is a fork as reference: https://github.com/gnud/speed-test If you approve the changes I can open a PR. |
Yeah, looks good. PR welcome. |
If anyone wants to work on this, see the initial attempt and feedback in #67. |
Hello @sindresorhus, This is my first time doing Open Source and I would like to start helping with this issue, I have read #67 as you suggested and the source code, the documentation about this timestamp could be added in the section Usage in the README file as part of the Options or only as a note that --json adds a timestamp? |
@danodlr since I can't allocate any time at the moment, please finish it. |
It would be lovely if you introduce a timestamp in the JSON output, so that if I probe with this app every few minutes I would know the probe time.
For the moment I need to transform the JSON output each time the app completes, or if we can have append custom object application arguments with data generated from somewhere else.
E.g:
speed-test -v -j -d '{"ts": "fdffd", "hostname": "pc1"}'
that way you don't have to change a lot, just at the end of the result generation to merge the arguments object.
Thanks.
The text was updated successfully, but these errors were encountered: