{
  "version": 10,
  "plumr_config": {
    "pipeline": {
      "session_reader-0": {
        "session_reader": {
          "input": "[session_reader-0|in:0]-[udp_remote-0|out:0]",
          "output": "[delay_constant-0-flows-1|in:0]-[session_reader-0|out:0]"
        }
      },
      "session_reader-1": {
        "session_reader": {
          "input": "[session_reader-1|in:0]-[udp_remote-1|out:0]",
          "output": "[delay_constant-1-flows-1|in:0]-[session_reader-1|out:0]"
        }
      },
      "udp_local-1": {
        "udp_local": {
          "output": "[raft-1-streams-0|in:0]-[udp_local-1|out:0]",
          "address": "127.0.0.1:5000"
        }
      },
      "udp_remote-0": {
        "udp_remote": {
          "input": "[udp_remote-0|in:0]-[peer_writer-0-outbound|out:0]",
          "output": "[session_reader-0|in:0]-[udp_remote-0|out:0]"
        }
      },
      "delay_constant-0": {
        "delay_constant": {
          "flows": [
            {
              "input": "[delay_constant-0-flows-0|in:0]-[loss_constant-0-flows-0|out:0]",
              "output": "[session_writer-0|in:0]-[delay_constant-0-flows-0|out:0]"
            },
            {
              "input": "[delay_constant-0-flows-1|in:0]-[session_reader-0|out:0]",
              "output": "[loss_constant-0-flows-1|in:0]-[delay_constant-0-flows-1|out:0]"
            }
          ],
          "delay": 50,
          "jitter": 1
        }
      },
      "delay_constant-1": {
        "delay_constant": {
          "flows": [
            {
              "input": "[delay_constant-1-flows-0|in:0]-[loss_constant-1-flows-0|out:0]",
              "output": "[session_writer-1|in:0]-[delay_constant-1-flows-0|out:0]"
            },
            {
              "input": "[delay_constant-1-flows-1|in:0]-[session_reader-1|out:0]",
              "output": "[loss_constant-1-flows-1|in:0]-[delay_constant-1-flows-1|out:0]"
            }
          ],
          "delay": 50,
          "jitter": 1
        }
      },
      "peer_writer-1-outbound": {
        "peer_writer": {
          "input": "[peer_writer-1-outbound|in:0]-[session_writer-1|out:0]",
          "output": "[udp_remote-1|in:0]-[peer_writer-1-outbound|out:0]",
          "remote_address": "127.0.0.1:1235"
        }
      },
      "session_writer-0": {
        "session_writer": {
          "input": "[session_writer-0|in:0]-[delay_constant-0-flows-0|out:0]",
          "output": "[peer_writer-0-outbound|in:0]-[session_writer-0|out:0]"
        }
      },
      "session_writer-1": {
        "session_writer": {
          "input": "[session_writer-1|in:0]-[delay_constant-1-flows-0|out:0]",
          "output": "[peer_writer-1-outbound|in:0]-[session_writer-1|out:0]"
        }
      },
      "udp_remote-1": {
        "udp_remote": {
          "input": "[udp_remote-1|in:0]-[peer_writer-1-outbound|out:0]",
          "output": "[session_reader-1|in:0]-[udp_remote-1|out:0]"
        }
      },
      "loss_constant-0": {
        "loss_constant": {
          "flows": [
            {
              "input": "[loss_constant-0-flows-0|in:0]-[raft-1-carriers-0|out:0]",
              "output": "[delay_constant-0-flows-0|in:0]-[loss_constant-0-flows-0|out:0]"
            },
            {
              "input": "[loss_constant-0-flows-1|in:0]-[delay_constant-0-flows-1|out:0]",
              "output": "[raft-1-carriers-0|in:0]-[loss_constant-0-flows-1|out:0]"
            }
          ]
        }
      },
      "loss_constant-1": {
        "loss_constant": {
          "flows": [
            {
              "input": "[loss_constant-1-flows-0|in:0]-[raft-1-carriers-1|out:0]",
              "output": "[delay_constant-1-flows-0|in:0]-[loss_constant-1-flows-0|out:0]"
            },
            {
              "input": "[loss_constant-1-flows-1|in:0]-[delay_constant-1-flows-1|out:0]",
              "output": "[raft-1-carriers-1|in:0]-[loss_constant-1-flows-1|out:0]"
            }
          ]
        }
      },
      "peer_writer-0-outbound": {
        "peer_writer": {
          "input": "[peer_writer-0-outbound|in:0]-[session_writer-0|out:0]",
          "output": "[udp_remote-0|in:0]-[peer_writer-0-outbound|out:0]",
          "remote_address": "127.0.0.1:1234"
        }
      },
      "raft-1": {
        "raft": {
          "streams": [
            {
              "input": "[raft-1-streams-0|in:0]-[udp_local-1|out:0]",
              "realtime_stream": {
                "timeout": 100,
                "delivery_policy": "ON_TIMEOUT",
                "extension": null
              }
            }
          ],
          "carriers": [
            {
              "input": "[raft-1-carriers-0|in:0]-[loss_constant-0-flows-1|out:0]",
              "output": "[loss_constant-0-flows-0|in:0]-[raft-1-carriers-0|out:0]"
            },
            {
              "input": "[raft-1-carriers-1|in:0]-[loss_constant-1-flows-1|out:0]",
              "output": "[loss_constant-1-flows-0|in:0]-[raft-1-carriers-1|out:0]",
              "carrier_handle": 1
            }
          ]
        }
      }
    }
  },
  "meta": {
    "component_display_coordinates": {
      "session_reader-1": {
        "x": 1240,
        "y": 920
      },
      "session_writer-0": {
        "x": 1240,
        "y": 440
      },
      "udp_remote-0": {
        "x": 1680,
        "y": 560
      },
      "udp_remote-1": {
        "x": 1680,
        "y": 920
      },
      "delay_constant-0": {
        "x": 1000,
        "y": 440
      },
      "delay_constant-1": {
        "x": 1000,
        "y": 800
      },
      "loss_constant-0": {
        "x": 760,
        "y": 440
      },
      "session_reader-0": {
        "x": 1240,
        "y": 560
      },
      "session_writer-1": {
        "x": 1240,
        "y": 800
      },
      "udp_local-1": {
        "x": 240,
        "y": 440
      },
      "loss_constant-1": {
        "x": 760,
        "y": 800
      },
      "peer_writer-0-outbound": {
        "x": 1440,
        "y": 440
      },
      "peer_writer-1-outbound": {
        "x": 1440,
        "y": 800
      },
      "raft-1": {
        "x": 480,
        "y": 440
      }
    },
    "component_display_order": {
      "delay_constant-1": 9,
      "loss_constant-0": 2,
      "peer_writer-0-outbound": 6,
      "peer_writer-1-outbound": 12,
      "raft-1": 1,
      "session_reader-0": 5,
      "session_reader-1": 11,
      "session_writer-0": 4,
      "delay_constant-0": 3,
      "loss_constant-1": 8,
      "session_writer-1": 10,
      "udp_local-1": 0,
      "udp_remote-0": 7,
      "udp_remote-1": 13
    }
  },
  "kpis": {
    "variables": {
      "source_carrier1_bw_in": "/pipeline/raft-1/raft_node/raft_carrier:1/bandwidth_in",
      "source_flow0_overall_viability": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/raft_realtime_flow:0/overall_viability",
      "source_flow1_overall_viability": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/raft_realtime_flow:1/overall_viability",
      "source_flow0_overall_repair_mode": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/raft_realtime_flow:0/overall_repair_mode",
      "source_flow1_overall_repair_mode": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/raft_realtime_flow:1/overall_repair_mode",
      "source_stream_bw_out": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/bandwidth_out",
      "source_carrier0_bw_in": "/pipeline/raft-1/raft_node/raft_carrier:0/bandwidth_in",
      "source_carrier0_bw_out": "/pipeline/raft-1/raft_node/raft_carrier:0/bandwidth_out",
      "source_carrier0_latency": "/pipeline/raft-1/raft_node/raft_carrier:0/raft_latency_estimator/link_trip_time",
      "source_carrier1_latency": "/pipeline/raft-1/raft_node/raft_carrier:1/raft_latency_estimator/link_trip_time",
      "source_carrier1_stable_loss": "/pipeline/raft-1/raft_node/raft_carrier:1/raft_loss_tracker/stable_loss_rate",
      "source_stream_control": "/pipeline/raft-1/raft_node/stream_control",
      "source_viability_control": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/viability_control",
      "source_carrier0_stable_loss": "/pipeline/raft-1/raft_node/raft_carrier:0/raft_loss_tracker/stable_loss_rate",
      "source_carrier1_bw_out": "/pipeline/raft-1/raft_node/raft_carrier:1/bandwidth_out",
      "source_stream_bw_in": "/pipeline/raft-1/raft_node/raft_realtime_stream:0/bandwidth_in"
    },
    "metrics": [
      {
        "label": "Source",
        "id": "mgte5lxw"
      },
      {
        "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": "mgte5lxx"
      },
      {
        "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": "mgte5lxy"
      },
      {
        "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": "mgte5lxz"
      },
      {
        "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": "mgte5ly0"
      },
      {
        "label": "Loss carrier0 (source)",
        "gauge": {
          "expression": "source_carrier0_stable_loss"
        },
        "description": "The stable loss rate of the carrier.",
        "id": "mgte5ly1"
      },
      {
        "label": "Latency carrier0",
        "value_over_time": {
          "expression": "source_carrier0_latency",
          "unit": "ms"
        },
        "description": "The latency of the carrier.",
        "id": "mgte5ly2"
      },
      {
        "label": "Loss carrier1 (source)",
        "gauge": {
          "expression": "source_carrier1_stable_loss"
        },
        "description": "The stable loss rate of the carrier.",
        "id": "mgte5ly3"
      },
      {
        "label": "Latency carrier1",
        "value_over_time": {
          "expression": "source_carrier1_latency",
          "unit": "ms"
        },
        "description": "The latency of the carrier.",
        "id": "mgte5ly4"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5ly5"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5ly6"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5ly7"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5ly8"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5ly9"
      },
      {
        "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"
            }
          ]
        },
        "id": "mgte5lya"
      },
      {
        "label": "Stream Bandwidth (in)",
        "value_over_time": {
          "expression": "source_stream_bw_in",
          "unit": "B/s"
        },
        "id": "mgte5lyb"
      },
      {
        "label": "Carrier0 Bandwidth",
        "value_over_time": {
          "expression": "source_carrier0_bw_out",
          "unit": "B/s"
        },
        "id": "mgte5lyc"
      },
      {
        "label": "Carrier1 Bandwidth",
        "value_over_time": {
          "expression": "source_carrier1_bw_out",
          "unit": "B/s"
        },
        "id": "mgte5lyd"
      }
    ]
  },
  "variables": [
    {
      "id": "m21wx11z",
      "label": "Stream Timeout",
      "description": "Timeout for the stream in milliseconds.",
      "paths": [
        "plumr_config.pipeline.raft-1.raft.streams[0].timeout"
      ]
    },
    {
      "id": "carrier0_delay",
      "label": "Carrier 0: Delay (ms)",
      "description": "The fixed delay in milliseconds.",
      "paths": [
        "plumr_config.pipeline.delay_constant-0.delay_constant.delay",
        "plumr_config.pipeline.delay_constant-0.delay_constant.delay"
      ]
    },
    {
      "id": "carrier0_jitter",
      "label": "Carrier 0: Jitter (ms)",
      "description": "The jitter in milliseconds.",
      "paths": [
        "plumr_config.pipeline.delay_constant-0.delay_constant.jitter",
        "plumr_config.pipeline.delay_constant-0.delay_constant.jitter"
      ]
    },
    {
      "id": "carrier0_loss",
      "label": "Carrier 0: loss (%)",
      "description": "Probability of packet loss, ranging from 0.0 to 100.",
      "paths": [
        "plumr_config.pipeline.loss_constant-0.loss_constant.loss_probability",
        "plumr_config.pipeline.loss_constant-0.loss_constant.loss_probability"
      ]
    },
    {
      "id": "carrier1_delay",
      "label": "Carrier 1: Delay (ms)",
      "description": "The fixed delay in milliseconds.",
      "paths": [
        "plumr_config.pipeline.delay_constant-1.delay_constant.delay",
        "plumr_config.pipeline.delay_constant-1.delay_constant.delay"
      ]
    },
    {
      "id": "carrier1_jitter",
      "label": "Carrier 1: Jitter (ms)",
      "description": "The jitter in milliseconds.",
      "paths": [
        "plumr_config.pipeline.delay_constant-1.delay_constant.jitter",
        "plumr_config.pipeline.delay_constant-1.delay_constant.jitter"
      ]
    },
    {
      "id": "carrier1_loss",
      "label": "Carrier 1: loss (%)",
      "description": "Probability of packet loss, ranging from 0.0 to 100.",
      "paths": [
        "plumr_config.pipeline.loss_constant-1.loss_constant.loss_probability",
        "plumr_config.pipeline.loss_constant-1.loss_constant.loss_probability"
      ]
    }
  ]
}