From 76f0b648fa266845bfe426f0863363cf3f111288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Galy-Fajou?= Date: Tue, 12 Mar 2024 18:47:29 +0100 Subject: [PATCH] Add elapsed time information when running notebooks (#135) --- src/Actions.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Actions.jl b/src/Actions.jl index df6ca1b..3b5c55a 100644 --- a/src/Actions.jl +++ b/src/Actions.jl @@ -71,7 +71,7 @@ function process( cached_state = skip_cache ? nothing : try_fromcache(settings.Export.cache_dir, new_hash) - run = if cached_state !== nothing + t_elapsed = @elapsed run = if cached_state !== nothing @info "Loaded from cache, skipping notebook run" s.path new_hash original_state = cached_state FinishedNotebook(; path, original_state) @@ -117,7 +117,7 @@ function process( ) end - @info "### ✓ $(progress) Ready" s.path new_hash + @info "### ✓ $(progress) Ready" s.path new_hash t_elapsed NotebookSession(; path, current_hash=new_hash, desired_hash=s.desired_hash, run) end @@ -302,4 +302,4 @@ function remove_static_export(path; settings, output_dir) !settings.Export.baked_notebookfile tryrm(export_jl_path) end -end \ No newline at end of file +end