Skip to content

Commit 302c678

Browse files
committed
Add timing logs for generating examples
1 parent 1e9a572 commit 302c678

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/make.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,18 @@ for dir in readdir(literate_path)
9999
postprocess = function(content)
100100
"""
101101
All of the examples can be found in Jupyter notebook form [here](../$(filename(zip_path)).zip).
102-
""" * content
102+
103+
```@setup $(filename(file))
104+
__START_TIME = time_ns()
105+
@info "Starting example $(filename(file))"
106+
```
107+
""" * content * """
108+
```@setup $(filename(file))
109+
__END_TIME = time_ns()
110+
elapsed = string(round((__END_TIME - __START_TIME)*1e-9; sigdigits = 3), "s")
111+
@info "Finished example $(filename(file)) after " * elapsed
112+
```
113+
"""
103114
end
104115
Literate.markdown(file_path, build_dir; preprocess = fix_math_md, documenter = true, postprocess = postprocess)
105116
else

0 commit comments

Comments
 (0)