Flow Monitor v0.1.3 FlowMonitor View Source

Measure progress of each step in a Flow pipeline.

Link to this section Summary

Functions

Runs the metrics collector on a given Flow pipeline. Results are store in a directory {graph_name}-{timestamp} in a given path. See FlowMonitor.Config for configurable options which can be passed as keyword list opts

Link to this section Functions

Link to this macro run(pipeline, opts \\ []) View Source (macro)
run(any(), keyword()) :: any()

Runs the metrics collector on a given Flow pipeline. Results are store in a directory {graph_name}-{timestamp} in a given path. See FlowMonitor.Config for configurable options which can be passed as keyword list opts.

Examples:

Specify path for collected metrics, name and title

opts = [
  path: "./metrics",
  graph_name: "collected-metrics",
  graph_title: "Metrics collected from a Flow execution"
]

FlowMonitor.run(
  1..100_000
  |> Flow.from_enumerable()
  |> Flow.map(&(&1 * &1)),

  opts
)

Specify other graph parameters

opts = [
  font_name: "Verdana",
  font_size: 12,
  graph_size: {800, 600},
  graph_range: {1000, 15000}
]

FlowMonitor.run(
  1..100_000
  |> Flow.from_enumerable()
  |> Flow.map(&(&1 * &1)),

  opts
)