@concavejs/devtools 0.0.1-alpha.14 → 0.0.1-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,11 +13,12 @@ Professional development tools for Convex/Concave applications. A high-signal br
13
13
  - Inline error visibility with focused details pane
14
14
 
15
15
  ### 📈 Performance Monitoring
16
- - Average and P95 latency metrics
16
+ - Average, P50/P90/P95/P99 latency metrics per operation type
17
+ - Per-function breakdown: calls, avg/P95 latency, error rate (sortable)
18
+ - Error count and rate across all operations
17
19
  - Slowest operations tracking
18
- - Queries, mutations, and actions statistics
19
- - Performance trend analysis
20
- - Click-through from slow operations to full Activity details
20
+ - Live 60-second latency sparklines per operation type
21
+ - Click-through from slow operations and functions to full Activity details
21
22
 
22
23
  ### 📡 Subscriptions Panel
23
24
  - Live subscribed query tracking
@@ -99,11 +100,17 @@ import { getGlobalEventStore } from "@concavejs/devtools";
99
100
 
100
101
  const store = getGlobalEventStore();
101
102
 
102
- // Subscribe to events
103
+ // Subscribe to events (one callback per event, delivered synchronously)
103
104
  const unsubscribe = store.subscribe((event) => {
104
105
  console.log("New event:", event);
105
106
  });
106
107
 
108
+ // Subscribe in coalesced batches (at most ~12 deliveries/second).
109
+ // Prefer this for UI rendering so chatty apps don't re-render per event.
110
+ const unsubscribeBatched = store.subscribeBatched((events) => {
111
+ console.log(`${events.length} new events`);
112
+ });
113
+
107
114
  // Get all events
108
115
  const events = store.getAllEvents();
109
116
 
@@ -116,6 +123,9 @@ const subscriptions = store.getActiveSubscriptions();
116
123
  // Get performance metrics
117
124
  const metrics = store.getPerformanceMetrics();
118
125
 
126
+ // Per-function aggregates (calls, errors, error rate, avg/p50/p95/max)
127
+ const functionStats = store.getFunctionStats();
128
+
119
129
  // Export session
120
130
  const session = store.exportSession();
121
131
 
@@ -178,18 +188,24 @@ Import a previously exported session:
178
188
 
179
189
  1. Open DevTools
180
190
  2. Go to Settings tab
181
- 3. Click "Import Session"
191
+ 3. Click "Import"
182
192
  4. Select the `.json` file
183
193
 
194
+ Importing pauses recording so live traffic doesn't mix into the imported
195
+ session; resume from the Settings tab or with **Cmd/Ctrl + P** when done.
196
+
184
197
  ### Time-Travel Debugging
185
198
 
186
199
  Create snapshots of your application state:
187
200
 
188
201
  1. Open DevTools → Settings
189
- 2. Click "Create Snapshot"
202
+ 2. Click "Snapshot"
190
203
  3. Continue using your app
191
204
  4. Click "Restore" on any snapshot to go back in time
192
205
 
206
+ Snapshots survive "Clear", so you can save a known-good state, clear the
207
+ noise, and still get back to it.
208
+
193
209
  ## Configuration
194
210
 
195
211
  ### Event Store Settings