https://github.com/flow-storm/flow-storm-async-flow-plugin
A FlowStorm plugin to debug core.async.flow graphs
https://github.com/flow-storm/flow-storm-async-flow-plugin
Last synced: 4 months ago
JSON representation
A FlowStorm plugin to debug core.async.flow graphs
- Host: GitHub
- URL: https://github.com/flow-storm/flow-storm-async-flow-plugin
- Owner: flow-storm
- Created: 2025-02-13T13:46:42.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-03-04T18:15:00.000Z (10 months ago)
- Last Synced: 2025-03-04T19:24:26.733Z (10 months ago)
- Language: Clojure
- Size: 454 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# FlowStorm core.async.flow plugin

The core.async.flow plugin allows you to visualize your core.async.flow graph recorded activity from a graph view.
**Note: this plugin is still on alpha the same as core.async.flow!**
**This plugin is currently tested against core.async 1.9.808-alpha1**
**Requires FlowStorm >= 4.5.0**
# Setup
[](https://clojars.org/com.github.flow-storm/flow-storm-async-flow-plugin)
In your deps.edn (same can be done with lein profiles) create an alias like :
```clojure
{...
:aliases
{...
:fs-async-flow-plugin {:extra-deps {com.github.flow-storm/flow-storm-async-flow-plugin {:mvn/version "1.0.1-alpha1"}} ;; check the latest
:jvm-opts ["-Dclojure.storm.instrumentOnlyPrefixes.asyncFlowPlugin=clojure.core.async.flow"
"-Dflowstorm.plugins.namespaces.asyncFlowPlugin=flow-storm.plugins.async-flow.all"]}
}}}
```
Then, in your projects, just make sure you start your repl with the `:fs-async-flow-plugin` alias.
# Usage
The plugin needs you to record the total order timeline, so your recordings should be made with the second (from the right) recording button
enable.
In order to extract the graph structures from the recording it needs to record the flow start of your graph, basically when
`(flow/start graph)` gets called.
After that you can draw the graph and extract messages by going to the `Async Flow` plugin tab and selecting the flow-id, then clicking
the refresh button.
You can move around the nodes by dragging them to improve how the graph looks.
After the messages are loaded you should be able to **double-click** on a channel in the graph representation to see
the messages in the bottom panel.
**Important: the messages showing on each edge are the messages as received in the input channels of the receiving process,
not as they are leaving the sending process.**
If the message is arriving to a *non :compute node*, double clicking on it will take you to the code stepper right before that
message is going to be processed.