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

Incorrect output values in issue_metrics.json #161

Closed
eichisanden opened this issue Nov 1, 2023 · 2 comments
Closed

Incorrect output values in issue_metrics.json #161

eichisanden opened this issue Nov 1, 2023 · 2 comments

Comments

@eichisanden
Copy link
Contributor

eichisanden commented Nov 1, 2023

Incorrect output values for average_time_to_first_response and average_time_to_close in issue_metrics.json
The actual values in issue_metrics.json are shown below, but the timedelta map values have been output.

{
    "average_time_to_first_response": "{'avg': datetime.timedelta(seconds=50124), 'med': datetime.timedelta(seconds=10122), '90p': datetime.timedelta(days=1, seconds=15064)}",
    "average_time_to_close": "{'avg': datetime.timedelta(seconds=69549), 'med': datetime.timedelta(seconds=19616), '90p': datetime.timedelta(days=2, seconds=78098)}",
    "average_time_to_answer": "None",
    "average_time_in_labels": {

https://github.com/github/issue-metrics/blob/9291773ac94d1e6e9afa852d792e92230f882582/json_writer.py#L85C22-L85C22

In the above code, the variable average_time_to_first_response used to be of type timedelta, but it has changed to type map, so need to specify the element to get.

@eichisanden eichisanden changed the title Incorrect output values for average_time_to_first_response and average_time_to_close in issue_metrics.json Incorrect output values in issue_metrics.json Nov 1, 2023
@eichisanden
Copy link
Contributor Author

fixed in #163

@eichisanden
Copy link
Contributor Author

I also added #164 support for median and 90th percentile.
Please merge the ones you like.

zkoppert added a commit that referenced this issue Nov 1, 2023
fix: #161 Incorrect output values in issue_metrics.json
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

1 participant