Skip to content

Commit f1c5fa0

Browse files
warren830tamas-la
authored andcommitted
feat(q-dev): add Developer AI Productivity Hours dashboard (#8797)
Analyze when developers are most productive with AI tools: - AI Activity by Hour of Day (chat + completions stacked bar) - Prompt & Response Length by Hour (complexity patterns) - Feature Usage by Hour (steering/spec mode/plain chat) - AI Activity by Day of Week
1 parent f067fd4 commit f1c5fa0

1 file changed

Lines changed: 162 additions & 0 deletions

File tree

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": "-- Grafana --",
7+
"enable": true,
8+
"hide": true,
9+
"iconColor": "rgba(0, 211, 255, 1)",
10+
"name": "Annotations & Alerts",
11+
"type": "dashboard"
12+
}
13+
]
14+
},
15+
"editable": true,
16+
"fiscalYearStartMonth": 0,
17+
"graphTooltip": 1,
18+
"id": null,
19+
"links": [],
20+
"panels": [
21+
{
22+
"datasource": "mysql",
23+
"description": "Chat and completion events by hour of day",
24+
"fieldConfig": {
25+
"defaults": {
26+
"color": { "mode": "palette-classic" },
27+
"custom": {
28+
"drawStyle": "bars", "fillOpacity": 80, "lineWidth": 1,
29+
"stacking": { "mode": "normal" }, "thresholdsStyle": { "mode": "off" }
30+
},
31+
"unit": "short"
32+
},
33+
"overrides": []
34+
},
35+
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 0 },
36+
"id": 1,
37+
"options": {
38+
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
39+
"tooltip": { "mode": "multi" }
40+
},
41+
"targets": [
42+
{
43+
"datasource": "mysql",
44+
"format": "table",
45+
"rawQuery": true,
46+
"rawSql": "SELECT LPAD(CAST(hr AS CHAR), 2, '0') AS 'Hour',\n SUM(chat) AS 'Chat Events', SUM(comp) AS 'Completion Events'\nFROM (\n SELECT HOUR(timestamp) AS hr, COUNT(*) AS chat, 0 AS comp\n FROM _tool_q_dev_chat_log WHERE $__timeFilter(timestamp)\n GROUP BY HOUR(timestamp)\n UNION ALL\n SELECT HOUR(timestamp) AS hr, 0 AS chat, COUNT(*) AS comp\n FROM _tool_q_dev_completion_log WHERE $__timeFilter(timestamp)\n GROUP BY HOUR(timestamp)\n) t GROUP BY hr ORDER BY hr",
47+
"refId": "A"
48+
}
49+
],
50+
"title": "AI Activity by Hour of Day (UTC)",
51+
"type": "barchart"
52+
},
53+
{
54+
"datasource": "mysql",
55+
"description": "Average prompt complexity and response richness by hour",
56+
"fieldConfig": {
57+
"defaults": {
58+
"color": { "mode": "palette-classic" },
59+
"custom": {
60+
"drawStyle": "line", "fillOpacity": 10, "lineInterpolation": "smooth", "lineWidth": 2,
61+
"showPoints": "auto", "spanNulls": true,
62+
"stacking": { "mode": "none" }, "thresholdsStyle": { "mode": "off" }
63+
},
64+
"unit": "short"
65+
},
66+
"overrides": []
67+
},
68+
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
69+
"id": 2,
70+
"options": {
71+
"legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true },
72+
"tooltip": { "mode": "multi" }
73+
},
74+
"targets": [
75+
{
76+
"datasource": "mysql",
77+
"format": "table",
78+
"rawQuery": true,
79+
"rawSql": "SELECT LPAD(CAST(HOUR(timestamp) AS CHAR), 2, '0') AS 'Hour',\n ROUND(AVG(prompt_length)) AS 'Avg Prompt Length',\n ROUND(AVG(response_length)) AS 'Avg Response Length'\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY HOUR(timestamp)\nORDER BY HOUR(timestamp)",
80+
"refId": "A"
81+
}
82+
],
83+
"title": "Prompt & Response Length by Hour",
84+
"type": "barchart"
85+
},
86+
{
87+
"datasource": "mysql",
88+
"description": "Steering and spec mode usage concentration by hour",
89+
"fieldConfig": {
90+
"defaults": {
91+
"color": { "mode": "palette-classic" },
92+
"custom": {
93+
"drawStyle": "bars", "fillOpacity": 80, "lineWidth": 1,
94+
"stacking": { "mode": "normal" }, "thresholdsStyle": { "mode": "off" }
95+
},
96+
"unit": "short"
97+
},
98+
"overrides": []
99+
},
100+
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
101+
"id": 3,
102+
"options": {
103+
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
104+
"tooltip": { "mode": "multi" }
105+
},
106+
"targets": [
107+
{
108+
"datasource": "mysql",
109+
"format": "table",
110+
"rawQuery": true,
111+
"rawSql": "SELECT LPAD(CAST(HOUR(timestamp) AS CHAR), 2, '0') AS 'Hour',\n SUM(CASE WHEN has_steering = 1 THEN 1 ELSE 0 END) AS 'Steering',\n SUM(CASE WHEN is_spec_mode = 1 THEN 1 ELSE 0 END) AS 'Spec Mode',\n SUM(CASE WHEN has_steering = 0 AND is_spec_mode = 0 THEN 1 ELSE 0 END) AS 'Plain Chat'\nFROM _tool_q_dev_chat_log\nWHERE $__timeFilter(timestamp)\nGROUP BY HOUR(timestamp)\nORDER BY HOUR(timestamp)",
112+
"refId": "A"
113+
}
114+
],
115+
"title": "Feature Usage by Hour",
116+
"type": "barchart"
117+
},
118+
{
119+
"datasource": "mysql",
120+
"description": "Day-of-week activity pattern",
121+
"fieldConfig": {
122+
"defaults": {
123+
"color": { "mode": "palette-classic" },
124+
"custom": {
125+
"drawStyle": "bars", "fillOpacity": 80, "lineWidth": 1,
126+
"stacking": { "mode": "normal" }, "thresholdsStyle": { "mode": "off" }
127+
},
128+
"unit": "short"
129+
},
130+
"overrides": []
131+
},
132+
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 },
133+
"id": 4,
134+
"options": {
135+
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
136+
"tooltip": { "mode": "multi" }
137+
},
138+
"targets": [
139+
{
140+
"datasource": "mysql",
141+
"format": "table",
142+
"rawQuery": true,
143+
"rawSql": "SELECT\n CASE DAYOFWEEK(timestamp)\n WHEN 1 THEN 'Sun' WHEN 2 THEN 'Mon' WHEN 3 THEN 'Tue'\n WHEN 4 THEN 'Wed' WHEN 5 THEN 'Thu' WHEN 6 THEN 'Fri' WHEN 7 THEN 'Sat'\n END AS 'Day',\n SUM(chat) AS 'Chat Events', SUM(comp) AS 'Completions'\nFROM (\n SELECT timestamp, COUNT(*) AS chat, 0 AS comp FROM _tool_q_dev_chat_log WHERE $__timeFilter(timestamp) GROUP BY timestamp\n UNION ALL\n SELECT timestamp, 0, COUNT(*) FROM _tool_q_dev_completion_log WHERE $__timeFilter(timestamp) GROUP BY timestamp\n) t\nGROUP BY DAYOFWEEK(timestamp)\nORDER BY DAYOFWEEK(timestamp)",
144+
"refId": "A"
145+
}
146+
],
147+
"title": "AI Activity by Day of Week",
148+
"type": "barchart"
149+
}
150+
],
151+
"preload": false,
152+
"refresh": "5m",
153+
"schemaVersion": 41,
154+
"tags": ["q_dev", "kiro", "productivity", "hours"],
155+
"templating": { "list": [] },
156+
"time": { "from": "now-90d", "to": "now" },
157+
"timepicker": {},
158+
"timezone": "utc",
159+
"title": "Developer AI Productivity Hours",
160+
"uid": "kiro_productivity_hours",
161+
"version": 1
162+
}

0 commit comments

Comments
 (0)