Skip to content

Commit

Permalink
perf-fix-skipping-streaming-data
Browse files Browse the repository at this point in the history
  • Loading branch information
swiffer committed Oct 9, 2024
1 parent ad34131 commit f7d7260
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions grafana/dashboards/charging-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,12 @@
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT (\n SELECT sum(cost)\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n) / (\n\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100",
"rawSql": "SELECT (\n SELECT sum(cost)\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n) / (\n\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id and ideal_battery_range_km is not null\n) * 100",
"refId": "A",
"select": [
[
Expand All @@ -543,6 +544,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "cars",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
Expand Down Expand Up @@ -2544,6 +2562,6 @@
"timezone": "",
"title": "Charging Stats",
"uid": "-pkIkhmRz",
"version": 8,
"version": 10,
"weekStart": ""
}

0 comments on commit f7d7260

Please sign in to comment.