Skip to content

Commit

Permalink
Add elapsed time information when running notebooks (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
theogf authored Mar 12, 2024
1 parent 08dafcc commit 76f0b64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Actions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -302,4 +302,4 @@ function remove_static_export(path; settings, output_dir)
!settings.Export.baked_notebookfile
tryrm(export_jl_path)
end
end
end

0 comments on commit 76f0b64

Please sign in to comment.