Add timings command option and fix timings #695
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
-t
command line option to align with the originalasciidoctor
command.Previously the timings should've been printed when starting with
-v
(verbose mode).But it looks like this didn't even work, as the timings are now managed by the
Asciidoctor::Timings
class which has to be present in the options.I fixed this by explicitly creating such an instance, and then after the rendering calling this to print its report, so that the report should also look identically to what asciidoctor produces.
Along the way I also found an error in the tests regarding the destination dir option
-D
.The test
destination_dir_should_render_files_to_ouput_directory()
also fails on the current master when running in isolation.It only succeeded because the test
verbose_option_should_fill_monitor_map()
was executed before.