|
| 1 | +{ |
| 2 | + "title": "Kompact", |
| 3 | + "uid": "kompact", |
| 4 | + "editable": true, |
| 5 | + "time": { "from": "now-1h", "to": "now" }, |
| 6 | + "refresh": "5s", |
| 7 | + "panels": [ |
| 8 | + { |
| 9 | + "title": "Request Rate", |
| 10 | + "type": "timeseries", |
| 11 | + "gridPos": { "h": 8, "w": 8, "x": 0, "y": 0 }, |
| 12 | + "targets": [ |
| 13 | + { |
| 14 | + "expr": "rate(kompact_requests_total[1m])", |
| 15 | + "legendFormat": "{{model}}" |
| 16 | + } |
| 17 | + ], |
| 18 | + "fieldConfig": { |
| 19 | + "defaults": { "unit": "reqps" } |
| 20 | + }, |
| 21 | + "options": { |
| 22 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 23 | + } |
| 24 | + }, |
| 25 | + { |
| 26 | + "title": "Tokens Saved (rate/min)", |
| 27 | + "type": "timeseries", |
| 28 | + "gridPos": { "h": 8, "w": 8, "x": 8, "y": 0 }, |
| 29 | + "targets": [ |
| 30 | + { |
| 31 | + "expr": "rate(kompact_tokens_saved_total[1m]) * 60", |
| 32 | + "legendFormat": "{{model}}" |
| 33 | + } |
| 34 | + ], |
| 35 | + "fieldConfig": { |
| 36 | + "defaults": { "unit": "short" } |
| 37 | + }, |
| 38 | + "options": { |
| 39 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 40 | + } |
| 41 | + }, |
| 42 | + { |
| 43 | + "title": "Token Savings", |
| 44 | + "type": "gauge", |
| 45 | + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 0 }, |
| 46 | + "targets": [ |
| 47 | + { |
| 48 | + "expr": "sum(rate(kompact_tokens_saved_total[5m])) / sum(rate(kompact_tokens_processed_total[5m]))", |
| 49 | + "legendFormat": "savings" |
| 50 | + } |
| 51 | + ], |
| 52 | + "fieldConfig": { |
| 53 | + "defaults": { |
| 54 | + "unit": "percentunit", |
| 55 | + "min": 0, |
| 56 | + "max": 1, |
| 57 | + "thresholds": { |
| 58 | + "steps": [ |
| 59 | + { "color": "red", "value": null }, |
| 60 | + { "color": "yellow", "value": 0.2 }, |
| 61 | + { "color": "green", "value": 0.4 } |
| 62 | + ] |
| 63 | + } |
| 64 | + } |
| 65 | + }, |
| 66 | + "options": { |
| 67 | + "showThresholdLabels": true, |
| 68 | + "showThresholdMarkers": true, |
| 69 | + "text": { "titleSize": 14, "valueSize": 32 } |
| 70 | + } |
| 71 | + }, |
| 72 | + { |
| 73 | + "title": "Total Tokens Saved", |
| 74 | + "type": "stat", |
| 75 | + "gridPos": { "h": 4, "w": 6, "x": 0, "y": 8 }, |
| 76 | + "targets": [ |
| 77 | + { |
| 78 | + "expr": "sum(kompact_tokens_saved_total)", |
| 79 | + "legendFormat": "tokens" |
| 80 | + } |
| 81 | + ], |
| 82 | + "fieldConfig": { |
| 83 | + "defaults": { "unit": "short" } |
| 84 | + } |
| 85 | + }, |
| 86 | + { |
| 87 | + "title": "Total Tokens Processed", |
| 88 | + "type": "stat", |
| 89 | + "gridPos": { "h": 4, "w": 6, "x": 6, "y": 8 }, |
| 90 | + "targets": [ |
| 91 | + { |
| 92 | + "expr": "sum(kompact_tokens_processed_total)", |
| 93 | + "legendFormat": "tokens" |
| 94 | + } |
| 95 | + ], |
| 96 | + "fieldConfig": { |
| 97 | + "defaults": { "unit": "short" } |
| 98 | + } |
| 99 | + }, |
| 100 | + { |
| 101 | + "title": "Total Requests", |
| 102 | + "type": "stat", |
| 103 | + "gridPos": { "h": 4, "w": 6, "x": 12, "y": 8 }, |
| 104 | + "targets": [ |
| 105 | + { |
| 106 | + "expr": "sum(kompact_requests_total)", |
| 107 | + "legendFormat": "requests" |
| 108 | + } |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + "title": "Pipeline Latency (p50 / p95 / p99)", |
| 113 | + "type": "timeseries", |
| 114 | + "gridPos": { "h": 4, "w": 6, "x": 18, "y": 8 }, |
| 115 | + "targets": [ |
| 116 | + { |
| 117 | + "expr": "histogram_quantile(0.50, sum(rate(kompact_pipeline_latency_ms_bucket[5m])) by (le))", |
| 118 | + "legendFormat": "p50" |
| 119 | + }, |
| 120 | + { |
| 121 | + "expr": "histogram_quantile(0.95, sum(rate(kompact_pipeline_latency_ms_bucket[5m])) by (le))", |
| 122 | + "legendFormat": "p95" |
| 123 | + }, |
| 124 | + { |
| 125 | + "expr": "histogram_quantile(0.99, sum(rate(kompact_pipeline_latency_ms_bucket[5m])) by (le))", |
| 126 | + "legendFormat": "p99" |
| 127 | + } |
| 128 | + ], |
| 129 | + "fieldConfig": { |
| 130 | + "defaults": { "unit": "ms" } |
| 131 | + }, |
| 132 | + "options": { |
| 133 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 134 | + } |
| 135 | + }, |
| 136 | + { |
| 137 | + "title": "Tokens Saved by Transform", |
| 138 | + "type": "timeseries", |
| 139 | + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 }, |
| 140 | + "targets": [ |
| 141 | + { |
| 142 | + "expr": "rate(kompact_transform_tokens_saved_total[1m]) * 60", |
| 143 | + "legendFormat": "{{transform}}" |
| 144 | + } |
| 145 | + ], |
| 146 | + "fieldConfig": { |
| 147 | + "defaults": { "unit": "short" } |
| 148 | + }, |
| 149 | + "options": { |
| 150 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 151 | + } |
| 152 | + }, |
| 153 | + { |
| 154 | + "title": "Transform Latency (p95)", |
| 155 | + "type": "timeseries", |
| 156 | + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 }, |
| 157 | + "targets": [ |
| 158 | + { |
| 159 | + "expr": "histogram_quantile(0.95, sum(rate(kompact_transform_latency_ms_bucket[5m])) by (le, transform))", |
| 160 | + "legendFormat": "{{transform}}" |
| 161 | + } |
| 162 | + ], |
| 163 | + "fieldConfig": { |
| 164 | + "defaults": { "unit": "ms" } |
| 165 | + }, |
| 166 | + "options": { |
| 167 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 168 | + } |
| 169 | + }, |
| 170 | + { |
| 171 | + "title": "Savings Over Time (cumulative)", |
| 172 | + "type": "timeseries", |
| 173 | + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 20 }, |
| 174 | + "targets": [ |
| 175 | + { |
| 176 | + "expr": "sum(kompact_tokens_saved_total)", |
| 177 | + "legendFormat": "saved" |
| 178 | + }, |
| 179 | + { |
| 180 | + "expr": "sum(kompact_tokens_processed_total)", |
| 181 | + "legendFormat": "processed" |
| 182 | + } |
| 183 | + ], |
| 184 | + "fieldConfig": { |
| 185 | + "defaults": { "unit": "short" } |
| 186 | + }, |
| 187 | + "options": { |
| 188 | + "legend": { "displayMode": "list", "placement": "bottom" } |
| 189 | + } |
| 190 | + } |
| 191 | + ] |
| 192 | +} |
0 commit comments