Skip to content

Instantly share code, notes, and snippets.

@fonsp
Created January 17, 2022 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fonsp/9551c8688f05b4baf21d3f242696dfcc to your computer and use it in GitHub Desktop.
Save fonsp/9551c8688f05b4baf21d3f242696dfcc to your computer and use it in GitHub Desktop.
import Pluto: Pluto, update_run!, WorkspaceManager, ClientSession, ServerSession, Notebook, Cell, SessionActions
using BenchmarkTools
🍭 = ServerSession();
# 🍭.options.evaluation.workspace_use_distributed = false
fakeclient = ClientSession(:fake, nothing);
🍭.connected_clients[fakeclient.id] = fakeclient;
nb = SessionActions.open(🍭, Pluto.project_relative_path("sample", "test_logging.jl"); run_async = false);
state1 = Pluto.notebook_to_js(nb);
state2 = Pluto.notebook_to_js(nb);
[v["logs"] |> length for (k, v) in state1["cell_results"]] |> sort
Pluto.Firebasey.diff(state1, state2)
@benchmark Pluto.notebook_to_js(nb)
@benchmark Pluto.Firebasey.diff(state1, state2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment