Skip to content

Write gallery execution times to JSON#1448

Closed
user27182 wants to merge 2 commits intosphinx-gallery:masterfrom
user27182:feat/sg_execution_times.json
Closed

Write gallery execution times to JSON#1448
user27182 wants to merge 2 commits intosphinx-gallery:masterfrom
user27182:feat/sg_execution_times.json

Conversation

@user27182
Copy link
Copy Markdown
Contributor

The gallery executions times are great, but they currently only generate rst versions. This is great for html rendering, but is not great if you want to parse the execution times (e.g. for testing purposes to limit build times).

This PR re-works the write_computation_times function to also generate JSON versions.

@larsoner
Copy link
Copy Markdown
Contributor

larsoner commented Apr 7, 2025

Build times should already be in https://sphinx-gallery.github.io/stable/configuration.html#junit-xml I think?

@user27182
Copy link
Copy Markdown
Contributor Author

Build times should already be in https://sphinx-gallery.github.io/stable/configuration.html#junit-xml I think?

Didn't know that! Thanks, will look into using that first

@user27182
Copy link
Copy Markdown
Contributor Author

Yup test times are all there.

@user27182 user27182 closed this Apr 7, 2025
@user27182 user27182 deleted the feat/sg_execution_times.json branch April 7, 2025 18:22
@larsoner
Copy link
Copy Markdown
Contributor

larsoner commented Apr 7, 2025

PR welcome to improve discovery / docs though!

@user27182
Copy link
Copy Markdown
Contributor Author

Thanks, I guess it would be helpful to add a cross-reference between these two options:
https://sphinx-gallery.github.io/stable/configuration.html#junit-xml
https://sphinx-gallery.github.io/stable/configuration.html#write-computation-times

And in write-computation-times it makes no mention of the fact that an orphaned table of all computation times is also generated by the build and included in the html output.

@lucyleeow lucyleeow mentioned this pull request Apr 8, 2025
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

Successfully merging this pull request may close these issues.

2 participants