Every file here runs on its own — npx ts-node examples/<file>.ts — and the ones that build a graph write their trace
next to themselves as JSON. The Graph Results links open that JSON in the
json-to-graph viewer.
The four marked docs are the ones shown on https://tabkram.github.io/execution-engine/examples, with their code beside the run they produced.
No engine and no graph: these wrap a single function and report what it did.
| Example Code | Output | |
|---|---|---|
| execution-trace.ts | execution-trace.json | docs |
| execution-cache.ts | prints to the console | docs |
| execution-memoize.ts | prints to the console | docs |
- execution-trace.ts:
executionTracearound one call — inputs, outputs, timing, returned as a record. - execution-cache.ts:
@cachekeyed on the arguments; the repeat call never reaches the API. - execution-memoize.ts:
@memoizestoring the in-flight promise, so twelve simultaneous callers share one execution.
- engine-sequential.ts: the smallest graph there is — four plain functions called through
engine.run, four nodes, three inferred edges. - engine-checkout.ts: one checkout through
@engineand@runthat exercises everything at once — a chain, nesting, recursion, a@cachehit, a@memoized call, and a fork and join at the top level. - engine-recursive.ts: a dependency tree resolved by a method that calls itself, where
@memoizemeans a package shared by three branches is walked once. - usage.ts: the fundamentals of
ExecutionEnginein a dozen lines. - authentication.ts: sequential execution, with a detailed trace for each step.
- car.ts: orchestrating tasks both simultaneously and hierarchically.
- usage2.ts:
@engineand@runfor a class-based approach. - weather.ts: custom parameters and options through decorators, including error handling.
- usage3.ts: a deep workflow with consecutive tasks.
- greeting.ts:
traceOptionsthrough decorators — extracting and reshaping what gets recorded.
| Example Code | Trace Output | Trace Graph |
|---|---|---|
| usage2.ts | usage2.json | Graph Results |
| usage3.ts | usage3.json | Graph Results |
| weather.ts | weather.json | Graph Results |
| greeting.ts | greeting.json | Graph Results |