-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
add duration of the scan to JSON #1937
Comments
@armijnhemel Thank you for this: would a duration in seconds work as in |
Having just seconds would be perfect. I could do formatting myself later. |
@pombredanne i would like to work on this feature. |
@pombredanne even I would love to work on this feature |
Hi, I have added the requested feature in the following pull requests: Now, you can see a 'time_taken' field in the header of the output JSON file, |
i guess i need to edit the test cases too since this feature requires direct change in the output JSON file, alot of test cases. So how should i go dealing with this ? any help is appreciated |
@MankaranSingh thank you for this! |
@MankaranSingh let's see if this need to be enabled at all times or not first before updating the tests. There are ways to regenerate test fixtures to help a bit |
I think that we can avoid yet another command line option. |
I would just always include it. |
@MankaranSingh so you will have indeed to update a good bunch of test scan files since they will now contain your new field... On te other hand, since this field will have a different value on each run, it is best excluded from most of the scan tests assertions, except for a few tests focused only on the tests of that feature. Does it make sense? There are very few places where these checks are done, mostly in this place https://github.com/nexB/scancode-toolkit/blob/develop/src/scancode/cli_test_utils.py |
ok, on it. |
@MankaranSingh best is to keep ticket related discussions on the ticket and you can ask for help in the chat linking to the ticket. |
I have opened another pull request #1942 also, i found no other tests that specifically tested the "start_timestamp" and "end_timestamp", so i too didn't write any other test for the "time_taken" feature. Also, @armijnhemel, i have updated my commit to store time as float instead of string. |
I wish to work on this issue. Is it still available? |
I suppose it is no longer available, but perhaps @pombredanne can clarify? |
Add new duration field to JSON output #1937
Short Description
currently there is already a start time stamp and end time stamp in the JSON output. It would be nice to also have a "duration" field so I don't have to compute that myself.
Possible Labels
Select Category
Describe the Update
How This Feature will help you/your organization
Possible Solution/Implementation Details
end_timestamp - start_timestamp
Example/Links if Any
Can you help with this Feature
The text was updated successfully, but these errors were encountered: