Skip to content

Commit

Permalink
Add comparison scenarios to BBR-terminated plot (#1059)
Browse files Browse the repository at this point in the history
* Add comparison scenarios to BBR-terminated plot

* Amount of data transferred

* Remove old
  • Loading branch information
cristinaleonr authored Sep 30, 2024
1 parent 94e6486 commit 9e4feb2
Showing 1 changed file with 181 additions and 17 deletions.
198 changes: 181 additions & 17 deletions config/federation/grafana/dashboards/Packet_Testing.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"x": 0,
"y": 1
},
"id": 11,
"id": 13,
"maxDataPoints": 80000,
"options": {
"config": {
Expand Down Expand Up @@ -80,8 +80,8 @@
"autorange": true,
"gridcolor": "#333",
"range": [
-0.0031193399074260423,
0.05926745824109479
-0.0027955028866605896,
0.0531145548465512
],
"title": {
"text": "Frequency"
Expand Down Expand Up @@ -134,7 +134,7 @@
"location": "",
"project": "mlab-sandbox",
"rawQuery": true,
"rawSql": "WITH steps AS (\n SELECT x, POW(10, x-.01) AS bucket_left, POW(10, x+.01) AS bucket_right\n FROM UNNEST(GENERATE_ARRAY(0, 3.5, .02)) AS x\n), \n\n-- Get all the ndt7 data.\nndt7 AS (\n SELECT ARRAY_REVERSE(raw.Download.ServerMeasurements)[SAFE_OFFSET(0)].TCPInfo AS tcpinfo, \n metadata.Value AS session_id, \n FROM `mlab-oti.ndt.ndt7`, UNNEST (raw.Download.ClientMetadata) AS metadata\n WHERE date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND raw.Download is not NULL \n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0\n AND metadata.Name = \"client_session_id\"\n),\n\n-- Select only pt tests with matching ndt7 tests.\npt AS (\n SELECT ARRAY_REVERSE(raw.Download.ServerMeasurements)[SAFE_OFFSET(0)].TCPInfo AS tcpinfo, \n metadata.Value AS session_id, \n \"BBR-terminated\" AS test_type\n FROM `mlab-oti.raw_pt.ndt7`, UNNEST (raw.Download.ClientMetadata) AS metadata\n WHERE date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND raw.Download is not NULL \n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0\n AND metadata.Name = \"client_session_id\"\n AND metadata.Value IN (SELECT session_id FROM ndt7)\n),\n\npdf_sort AS (\n SELECT bucket_left, bucket_right, test_type, IF((SAFE_DIVIDE(tcpinfo.BytesAcked*8,tcpinfo.ElapsedTime)) BETWEEN bucket_left AND bucket_right, 1, 0) AS present_true\n FROM pt, steps\n), pdf_totals AS ( \n SELECT bucket_left AS buckets, test_type, sum(present_true) AS total_true\n FROM pdf_sort\n GROUP BY bucket_left, test_type\n ORDER BY bucket_left\n), pdf_product AS (\n SELECT\n total_true,\n test_type,\n trunc(buckets,2) as buckets,\n total_true AS product_true,\n FROM pdf_totals\n ORDER BY buckets\n), pdf_normalized AS (\n SELECT \n buckets,\n test_type,\n product_true / SUM(product_true) OVER (partition BY test_type) AS normalized,\n \n FROM pdf_product\n ORDER BY buckets\n)\nSELECT\n buckets,\n normalized,\n test_type,\n\nFROM pdf_normalized",
"rawSql": "WITH steps AS (\n SELECT x, POW(10, x-.01) AS bucket_left, POW(10, x+.01) AS bucket_right\n FROM UNNEST(GENERATE_ARRAY(0, 3.5, .02)) AS x\n), \n\n-- Select only pt tests with matching ndt7 tests.\npt AS (\n SELECT ARRAY_REVERSE(raw.Download.ServerMeasurements)[SAFE_OFFSET(0)].TCPInfo AS tcpinfo, \n metadata.Value AS session_id, \n CASE\n WHEN (\"max_cwnd_gain\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) AND (\"early_exit\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"BBR and 50MB\"\n WHEN (\"max_cwnd_gain\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) AND (\"max_elapsed_time\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"BBR and 5s\"\n WHEN (\"early_exit\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"50MB\"\n WHEN (\"max_elapsed_time\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"5s\"\n ELSE \"BBR\" \n END AS test_type,\n FROM `mlab-oti.raw_pt.ndt7`, UNNEST (raw.Download.ClientMetadata) AS metadata\n WHERE date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND raw.Download is not NULL \n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0\n AND \"client_session_id\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)\n),\n\npdf_sort AS (\n SELECT bucket_left, bucket_right, test_type, IF((SAFE_DIVIDE(tcpinfo.BytesAcked*8,tcpinfo.ElapsedTime)) BETWEEN bucket_left AND bucket_right, 1, 0) AS present_true\n FROM pt, steps\n), pdf_totals AS ( \n SELECT bucket_left AS buckets, test_type, sum(present_true) AS total_true\n FROM pdf_sort\n GROUP BY bucket_left, test_type\n ORDER BY bucket_left\n), pdf_product AS (\n SELECT\n total_true,\n test_type,\n trunc(buckets,2) as buckets,\n total_true AS product_true,\n FROM pdf_totals\n ORDER BY buckets\n), pdf_normalized AS (\n SELECT \n buckets,\n test_type,\n product_true / SUM(product_true) OVER (partition BY test_type) AS normalized,\n \n FROM pdf_product\n ORDER BY buckets\n)\nSELECT\n buckets,\n normalized,\n test_type,\n\nFROM pdf_normalized",
"refId": "B",
"sql": {
"columns": [
Expand Down Expand Up @@ -166,6 +166,166 @@
"x": 0,
"y": 16
},
"id": 15,
"panels": [],
"title": "Data transferred",
"type": "row"
},
{
"datasource": {
"type": "grafana-bigquery-datasource",
"uid": "PB00E94094811FA13"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "MB Transferred",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 17
},
"id": 14,
"options": {
"legend": {
"calcs": [
"lastNotNull"
],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-bigquery-datasource",
"uid": "PB00E94094811FA13"
},
"editorMode": "code",
"format": 0,
"location": "",
"project": "mlab-sandbox",
"rawQuery": true,
"rawSql": "WITH\n pt AS (\n SELECT\n date, \n CASE\n WHEN (\"max_cwnd_gain\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) AND (\"early_exit\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"BBR and 50MB\"\n WHEN (\"max_cwnd_gain\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) AND (\"max_elapsed_time\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"BBR and 5s\"\n WHEN (\"early_exit\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"50MB\"\n WHEN (\"max_elapsed_time\" IN (SELECT metadata.Name FROM UNNEST(raw.Download.ClientMetadata) AS metadata)) THEN \"5s\"\n ELSE \"BBR\"\n END AS test_type,\n ARRAY_REVERSE(raw.Download.ServerMeasurements)[SAFE_OFFSET(0)].TCPInfo.BytesAcked/1000000 AS totalMB\n FROM\n `mlab-oti.raw_pt.ndt7`\n WHERE\n date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND raw.Download IS NOT NULL\n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0 \n)\n\nSELECT TIMESTAMP(date) AS time, test_type AS metric, SUM(totalMB) / COUNT(*) AS avgMB\nFROM pt\nGROUP BY date, test_type\nORDER BY time ASC",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
},
{
"datasource": {
"type": "grafana-bigquery-datasource",
"uid": "PB00E94094811FA13"
},
"editorMode": "code",
"format": 0,
"hide": false,
"location": "",
"project": "mlab-sandbox",
"rawQuery": true,
"rawSql": "WITH\n ndt AS (\n SELECT\n date, \n \"Full length\" AS test_type,\n ARRAY_REVERSE(raw.Download.ServerMeasurements)[SAFE_OFFSET(0)].TCPInfo.BytesAcked/1000000 AS totalMB\n FROM\n `mlab-oti.ndt.ndt7`\n WHERE\n date BETWEEN \"${__from:date:YYYY-MM-DD}\" AND \"${__to:date:YYYY-MM-DD}\"\n AND raw.Download IS NOT NULL\n AND ARRAY_LENGTH(raw.Download.ServerMeasurements) > 0 \n)\n\nSELECT TIMESTAMP(date) AS time, test_type AS metric, SUM(totalMB) / COUNT(*) AS avgMB\nFROM ndt\nGROUP BY date, test_type\nORDER BY time ASC",
"refId": "B",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Amount of Data Transferred",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 28
},
"id": 3,
"panels": [],
"title": "Packet Pair",
Expand Down Expand Up @@ -217,7 +377,7 @@
"h": 12,
"w": 24,
"x": 0,
"y": 17
"y": 29
},
"id": 4,
"options": {
Expand Down Expand Up @@ -296,7 +456,7 @@
"h": 11,
"w": 12,
"x": 0,
"y": 29
"y": 41
},
"id": 5,
"options": {
Expand Down Expand Up @@ -410,7 +570,7 @@
"h": 11,
"w": 12,
"x": 12,
"y": 29
"y": 41
},
"id": 9,
"options": {
Expand Down Expand Up @@ -508,7 +668,7 @@
"h": 10,
"w": 12,
"x": 0,
"y": 40
"y": 52
},
"id": 7,
"options": {
Expand All @@ -529,7 +689,7 @@
}
]
},
"pluginVersion": "10.2.2",
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -612,7 +772,7 @@
"h": 11,
"w": 12,
"x": 12,
"y": 40
"y": 52
},
"id": 10,
"options": {
Expand Down Expand Up @@ -678,7 +838,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 51
"y": 63
},
"id": 2,
"panels": [],
Expand All @@ -703,7 +863,11 @@
"tooltip": false,
"viz": false
},
"lineWidth": 1
"lineWidth": 1,
"stacking": {
"group": "A",
"mode": "none"
}
},
"mappings": [],
"thresholds": {
Expand All @@ -722,7 +886,7 @@
"h": 14,
"w": 24,
"x": 0,
"y": 52
"y": 64
},
"id": 1,
"options": {
Expand Down Expand Up @@ -801,7 +965,7 @@
"h": 10,
"w": 12,
"x": 0,
"y": 66
"y": 78
},
"id": 6,
"options": {
Expand Down Expand Up @@ -904,7 +1068,7 @@
"h": 10,
"w": 12,
"x": 12,
"y": 66
"y": 78
},
"id": 8,
"options": {
Expand All @@ -920,7 +1084,7 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "10.2.2",
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -971,6 +1135,6 @@
"timezone": "",
"title": "Packet Testing",
"uid": "d341c044-4e2c-4904-b05f-98e8bf1bbf32",
"version": 17,
"version": 24,
"weekStart": ""
}

0 comments on commit 9e4feb2

Please sign in to comment.