{
  "version": 10,
  "plumr_config": {
    "pipeline": {
      "peer_writer-2": {
        "peer_writer": {
          "input": "[peer_writer-2|in:0]-[raft-2-carriers-0|out:0]",
          "output": "[session_writer-1|in:0]-[peer_writer-2|out:0]",
          "remote_address": "0.0.0.0:1236"
        }
      },
      "peer_writer-4": {
        "peer_writer": {
          "input": "[peer_writer-4|in:0]-[uniform_traffic_source-1|out:0]",
          "output": "[udp_remote-4|in:0]-[peer_writer-4|out:0]",
          "remote_address": "0.0.0.0:1233"
        }
      },
      "session_reader-1": {
        "session_reader": {
          "input": "[session_reader-1|in:0]-[udp_remote-2|out:0]",
          "output": "[raft-2-carriers-0|in:0]-[session_reader-1|out:0]"
        }
      },
      "session_reader-2": {
        "session_reader": {
          "input": "[session_reader-2|in:0]-[udp_remote-3|out:0]",
          "output": "[raft-2-carriers-1|in:1]-[session_reader-2|out:0]"
        }
      },
      "uniform_traffic_source-1": {
        "uniform_traffic_source": {
          "output": "[peer_writer-4|in:0]-[uniform_traffic_source-1|out:0]",
          "total_packets": 5000,
          "interval": 25
        }
      },
      "peer_writer-5": {
        "peer_writer": {
          "input": "[peer_writer-5|in:0]-[udp_remote-4|out:0]",
          "output": "[udp_remote-5|in:0]-[peer_writer-5|out:0]",
          "remote_address": "127.0.0.1:6001"
        }
      },
      "raft-2": {
        "raft": {
          "streams": [
            {
              "output": "[peer_writer-1|in:0]-[raft-2-streams-0|out:0]",
              "stream_handle": 0,
              "realtime_stream": {
                "timeout": 300,
                "extension": {
                  "fixed_replication": {}
                }
              }
            }
          ],
          "carriers": [
            {
              "input": "[raft-2-carriers-0|in:0]-[session_reader-1|out:0]",
              "output": "[peer_writer-2|in:0]-[raft-2-carriers-0|out:0]",
              "carrier_handle": 0
            },
            {
              "input": "[raft-2-carriers-1|in:1]-[session_reader-2|out:0]",
              "output": "[peer_writer-3|in:0]-[raft-2-carriers-1|out:1]",
              "carrier_handle": 1
            }
          ]
        }
      },
      "udp_remote-2": {
        "udp_remote": {
          "input": "[udp_remote-2|in:0]-[session_writer-1|out:0]",
          "output": "[session_reader-1|in:0]-[udp_remote-2|out:0]"
        }
      },
      "udp_remote-1": {
        "udp_remote": {
          "input": "[udp_remote-1|in:0]-[peer_writer-1|out:0]"
        }
      },
      "udp_remote-4": {
        "udp_remote": {
          "input": "[udp_remote-4|in:0]-[peer_writer-4|out:0]",
          "output": "[peer_writer-5|in:0]-[udp_remote-4|out:0]"
        }
      },
      "peer_writer-1": {
        "peer_writer": {
          "input": "[peer_writer-1|in:0]-[raft-2-streams-0|out:0]",
          "output": "[udp_remote-1|in:0]-[peer_writer-1|out:0]",
          "remote_address": "127.0.0.1:6000"
        }
      },
      "peer_writer-3": {
        "peer_writer": {
          "input": "[peer_writer-3|in:0]-[raft-2-carriers-1|out:1]",
          "output": "[session_writer-2|in:0]-[peer_writer-3|out:0]",
          "remote_address": "0.0.0.0:1237"
        }
      },
      "session_writer-1": {
        "session_writer": {
          "input": "[session_writer-1|in:0]-[peer_writer-2|out:0]",
          "output": "[udp_remote-2|in:0]-[session_writer-1|out:0]"
        }
      },
      "session_writer-2": {
        "session_writer": {
          "input": "[session_writer-2|in:0]-[peer_writer-3|out:0]",
          "output": "[udp_remote-3|in:0]-[session_writer-2|out:0]"
        }
      },
      "udp_remote-3": {
        "udp_remote": {
          "input": "[udp_remote-3|in:0]-[session_writer-2|out:0]",
          "output": "[session_reader-2|in:0]-[udp_remote-3|out:0]"
        }
      },
      "udp_remote-5": {
        "udp_remote": {
          "input": "[udp_remote-5|in:0]-[peer_writer-5|out:0]"
        }
      }
    },
    "shm_config": null,
    "log_filters": [],
    "lifecycle_handler": {
      "env": null,
      "on_setup": [],
      "pre_start": [
        {
          "cmd": "/opt/homebrew/Cellar/gstreamer/1.26.5_3/bin/gst-launch-1.0 udpsrc port=6000 caps=\"application/x-rtp, media=video, encoding-name=H264, payload=96\" ! rtph264depay ! avdec_h264 ! videoconvert ! textoverlay text=\"NanoPing\" valignment=top halignment=center font-desc=\"Sans, 36\" ! autovideosink",
          "policy": "RUN_IN_BACKGROUND",
          "env": null
        },
        {
          "cmd": "/opt/homebrew/Cellar/gstreamer/1.26.5_3/bin/gst-launch-1.0 udpsrc port=6001 caps=\"application/x-rtp, media=video, encoding-name=H264, payload=96\" ! rtph264depay ! avdec_h264 ! videoconvert ! textoverlay text=\"UDP\" valignment=top halignment=center font-desc=\"Sans, 36\" ! autovideosink",
          "policy": "RUN_IN_BACKGROUND",
          "env": null
        }
      ],
      "post_start": [],
      "pre_stop": [],
      "post_stop": [
        {
          "cmd": "pkill -f gst-launch-1.0",
          "policy": "CONTINUE_ON_ERROR",
          "env": null
        }
      ]
    }
  },
  "meta": {
    "component_display_coordinates": {
      "udp_remote-1": {
        "x": -360,
        "y": 360
      },
      "udp_remote-3": {
        "x": 1280,
        "y": 880
      },
      "peer_writer-1": {
        "x": -120,
        "y": 440
      },
      "peer_writer-2": {
        "x": 800,
        "y": 480
      },
      "raft-2": {
        "x": 440,
        "y": 360
      },
      "session_writer-1": {
        "x": 1120,
        "y": 520
      },
      "udp_remote-5": {
        "x": 160,
        "y": 200
      },
      "udp_remote-2": {
        "x": 1320,
        "y": 600
      },
      "peer_writer-4": {
        "x": 520,
        "y": 0
      },
      "session_reader-2": {
        "x": 800,
        "y": 960
      },
      "udp_remote-4": {
        "x": 840,
        "y": 40
      },
      "uniform_traffic_source-1": {
        "x": 120,
        "y": -40
      },
      "peer_writer-3": {
        "x": 800,
        "y": 800
      },
      "peer_writer-5": {
        "x": 520,
        "y": 160
      },
      "session_reader-1": {
        "x": 800,
        "y": 680
      },
      "session_writer-2": {
        "x": 1040,
        "y": 840
      }
    },
    "component_display_order": {
      "raft-2": 3,
      "session_reader-1": 2,
      "session_reader-2": 6,
      "session_writer-1": 1,
      "peer_writer-1": 9,
      "peer_writer-3": 8,
      "udp_remote-4": 10,
      "peer_writer-2": 12,
      "peer_writer-4": 14,
      "peer_writer-5": 13,
      "udp_remote-1": 7,
      "session_writer-2": 5,
      "udp_remote-5": 11,
      "uniform_traffic_source-1": 15,
      "udp_remote-2": 0,
      "udp_remote-3": 4
    }
  },
  "kpis": {
    "variables": {
      "source_carrier1_stable_loss": "/pipeline/raft-2/raft_node/raft_carrier:1/raft_loss_tracker/stable_loss_rate",
      "source_stream_bw_in": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/bandwidth_in",
      "source_stream_control": "/pipeline/raft-2/raft_node/stream_control",
      "source_viability_control": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/viability_control",
      "source_carrier0_bw_in": "/pipeline/raft-2/raft_node/raft_carrier:0/bandwidth_in",
      "source_carrier0_bw_out": "/pipeline/raft-2/raft_node/raft_carrier:0/bandwidth_out",
      "source_carrier0_stable_loss": "/pipeline/raft-2/raft_node/raft_carrier:0/raft_loss_tracker/stable_loss_rate",
      "source_carrier1_latency": "/pipeline/raft-2/raft_node/raft_carrier:1/raft_latency_estimator/link_trip_time",
      "source_flow1_overall_viability": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/raft_realtime_flow:1/overall_viability",
      "source_stream_bw_out": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/bandwidth_out",
      "source_carrier0_latency": "/pipeline/raft-2/raft_node/raft_carrier:0/raft_latency_estimator/link_trip_time",
      "source_carrier1_bw_out": "/pipeline/raft-2/raft_node/raft_carrier:1/bandwidth_out",
      "source_flow0_overall_repair_mode": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/raft_realtime_flow:0/overall_repair_mode",
      "source_flow0_overall_viability": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/raft_realtime_flow:0/overall_viability",
      "source_flow1_overall_repair_mode": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/raft_realtime_flow:1/overall_repair_mode",
      "a": "/pipeline/raft-2/raft_node/raft_realtime_stream:0/raft_loss_tracker/stable_loss_rate",
      "source_carrier1_bw_in": "/pipeline/raft-2/raft_node/raft_carrier:1/bandwidth_in"
    },
    "metrics": [
      {
        "label": "Reliability (sink)",
        "gauge": {
          "expression": "100 - a"
        },
        "description": "",
        "id": "0"
      },
      {
        "label": "Data Rate Rx",
        "data_rate": {
          "goodput_expression": "source_stream_bw_out",
          "overhead_expression": "(source_carrier0_bw_in + source_carrier1_bw_in) - source_stream_bw_out",
          "type": "RATE"
        },
        "description": "Represents the reception data rate, including goodput and overhead.",
        "id": "2"
      },
      {
        "label": "Data Rate Tx",
        "data_rate": {
          "goodput_expression": "source_stream_bw_in",
          "overhead_expression": "(source_carrier0_bw_out + source_carrier1_bw_out) - source_stream_bw_in",
          "type": "RATE"
        },
        "description": "Represents the reception data rate, including goodput and overhead.",
        "id": "3"
      },
      {
        "label": "Data Overhead Rx",
        "gauge": {
          "expression": "(1.0 - (source_stream_bw_out / (source_carrier0_bw_in + source_carrier1_bw_in))) * 100"
        },
        "description": "Represents the reception overhead percentage, calculated as the proportion of non-goodput data in the total received data.",
        "id": "4"
      },
      {
        "label": "Data Overhead Tx",
        "gauge": {
          "expression": "(1.0 - (source_stream_bw_in / (source_carrier0_bw_out + source_carrier1_bw_out))) * 100"
        },
        "description": "Represents the reception overhead percentage, calculated as the proportion of non-goodput data in the total received data.",
        "id": "5"
      },
      {
        "label": "Loss carrier0 (source)",
        "gauge": {
          "expression": "source_carrier0_stable_loss"
        },
        "description": "",
        "id": "8"
      },
      {
        "label": "Loss carrier1 (source)",
        "gauge": {
          "expression": "source_carrier1_stable_loss"
        },
        "description": "",
        "id": "9"
      },
      {
        "label": "Latency carrier0",
        "value_over_time": {
          "expression": "source_carrier0_latency",
          "unit": "ms"
        },
        "description": "",
        "id": "10"
      },
      {
        "label": "Latency carrier1",
        "value_over_time": {
          "expression": "source_carrier1_latency",
          "unit": "ms"
        },
        "description": "",
        "id": "11"
      },
      {
        "label": "Source -> Stream Control",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_stream_control == 0",
              "text": "local",
              "color": "orange"
            },
            {
              "expression": "source_stream_control == 1",
              "text": "remote",
              "color": "yellow"
            }
          ]
        },
        "description": "",
        "id": "m36efib3"
      },
      {
        "label": "Source -> Viability Control",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_viability_control == 0",
              "text": "undetermined",
              "color": "red"
            },
            {
              "expression": "source_viability_control == 1",
              "text": "local",
              "color": "orange"
            },
            {
              "expression": "source_viability_control == 2",
              "text": "remote",
              "color": "yellow"
            }
          ]
        },
        "description": "",
        "id": "m36eodgc"
      },
      {
        "label": "Source -> Carrier0",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_flow0_overall_viability == 0",
              "text": "disabled",
              "color": "red"
            },
            {
              "expression": "source_flow0_overall_viability == 1",
              "text": "pending",
              "color": "orange"
            },
            {
              "expression": "source_flow0_overall_viability == 2",
              "text": "viable",
              "color": "green"
            },
            {
              "expression": "source_flow0_overall_viability == 3",
              "text": "prospect",
              "color": "yellow"
            },
            {
              "expression": "source_flow0_overall_viability == 4",
              "text": "non_viable",
              "color": "red"
            }
          ]
        },
        "description": "",
        "id": "12"
      },
      {
        "label": "Source -> Carrier1",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_flow1_overall_viability == 0",
              "text": "disabled",
              "color": "red"
            },
            {
              "expression": "source_flow1_overall_viability == 1",
              "text": "pending",
              "color": "orange"
            },
            {
              "expression": "source_flow1_overall_viability == 2",
              "text": "viable",
              "color": "green"
            },
            {
              "expression": "source_flow1_overall_viability == 3",
              "text": "prospect",
              "color": "yellow"
            },
            {
              "expression": "source_flow1_overall_viability == 4",
              "text": "non_viable",
              "color": "red"
            }
          ]
        },
        "description": "",
        "id": "13"
      },
      {
        "label": "Source Flow0 (repair mode)",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_flow0_overall_repair_mode == 0",
              "text": "off",
              "color": "red"
            },
            {
              "expression": "source_flow0_overall_repair_mode == 1",
              "text": "backup",
              "color": "orange"
            },
            {
              "expression": "source_flow0_overall_repair_mode == 2",
              "text": "instant",
              "color": "yellow"
            },
            {
              "expression": "source_flow0_overall_repair_mode == 3",
              "text": "proactive",
              "color": "green"
            },
            {
              "expression": "source_flow0_overall_repair_mode == 4",
              "text": "reactive",
              "color": "green"
            }
          ]
        },
        "description": "",
        "id": "14"
      },
      {
        "label": "Source Flow1 (repair mode)",
        "value_to_text_conditions": {
          "conditions": [
            {
              "expression": "source_flow1_overall_repair_mode == 0",
              "text": "off",
              "color": "red"
            },
            {
              "expression": "source_flow1_overall_repair_mode == 1",
              "text": "backup",
              "color": "orange"
            },
            {
              "expression": "source_flow1_overall_repair_mode == 2",
              "text": "instant",
              "color": "yellow"
            },
            {
              "expression": "source_flow1_overall_repair_mode == 3",
              "text": "proactive",
              "color": "green"
            },
            {
              "expression": "source_flow1_overall_repair_mode == 4",
              "text": "reactive",
              "color": "green"
            }
          ]
        },
        "description": "",
        "id": "15"
      },
      {
        "label": "Stream Bandwidth (in)",
        "value_over_time": {
          "expression": "source_stream_bw_in",
          "unit": "B/s"
        },
        "description": "",
        "id": "16"
      },
      {
        "label": "Carrier0 Bandwidth",
        "value_over_time": {
          "expression": "source_carrier0_bw_out",
          "unit": "B/s"
        },
        "description": "",
        "id": "17"
      },
      {
        "label": "Carrier1 Bandwidth",
        "value_over_time": {
          "expression": "source_carrier1_bw_out",
          "unit": "B/s"
        },
        "description": "",
        "id": "18"
      }
    ]
  },
  "variables": [
    {
      "id": "carrier0_delay",
      "label": "Carrier 0: Delay (ms)",
      "description": "Time emulation need to hold back packets",
      "paths": [
        "plumr_config.pipeline.delay_constant-1.delay_constant.delay"
      ]
    },
    {
      "id": "carrier1_delay",
      "label": "Carrier 1: Delay (ms)",
      "description": "Time emulation need to hold back packets",
      "paths": [
        "plumr_config.pipeline.delay_constant-2.delay_constant.delay"
      ]
    },
    {
      "id": "carrier0_jitter",
      "label": "Carrier 0: Jitter (ms)",
      "description": "Time varience in how long packets are delayed",
      "paths": [
        "plumr_config.pipeline.delay_constant-1.delay_constant.jitter"
      ]
    },
    {
      "id": "carrier1_jitter",
      "label": "Carrier 1: Jitter (ms)",
      "description": "Time varience in how long packets are delayed",
      "paths": [
        "plumr_config.pipeline.delay_constant-1.delay_constant.jitter"
      ]
    },
    {
      "id": "m21wx11z",
      "label": "Stream Timeout",
      "description": "Timeout for the stream in milliseconds.",
      "paths": [
        "plumr_config.pipeline.raft-2.raft.streams[0].timeout",
        "plumr_config.pipeline.raft-5.raft.streams[0].timeout"
      ]
    },
    {
      "id": "m2284787",
      "label": "Carrier0 loss (%)",
      "description": "Probability of packet loss, ranging from 0.0 to 100.",
      "paths": [
        "plumr_config.pipeline.loss_constant-1.loss_constant.loss_probability"
      ]
    },
    {
      "id": "m2284st8",
      "label": "Carrier1 loss (%)",
      "description": "Probability of packet loss, ranging from 0.0 to 100.",
      "paths": [
        "plumr_config.pipeline.loss_constant-2.loss_constant.loss_probability"
      ]
    }
  ]
}