perfgraph 0.1.0 → 0.1.1
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 +66 -62
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[![npm][badge-version]][npm] [![license][badge-license]][license]
|
|
4
4
|
[![npm downloads][badge-downloads]][npm] [![github stars][badge-stars]][repo]
|
|
5
|
+

|
|
5
6
|
|
|
6
7
|
> Real browser metrics → causal degradation graph → actionable report. Built for AI agents, useful for humans.
|
|
7
8
|
|
|
@@ -11,6 +12,9 @@ PerfGraph launches a headless Chromium browser, captures performance data via Ch
|
|
|
11
12
|
npx perfgraph run --url https://example.com --pretty
|
|
12
13
|
```
|
|
13
14
|
|
|
15
|
+
PerfGraph — not a symptom list, a diagnosis.
|
|
16
|
+
Root cause → impact → fix, in one graph.
|
|
17
|
+
|
|
14
18
|
## Why
|
|
15
19
|
|
|
16
20
|
Lighthouse gives you a score. PerfGraph tells you _why_ it's bad and what to fix first.
|
|
@@ -138,68 +142,68 @@ The report is a single JSON file. Key sections:
|
|
|
138
142
|
|
|
139
143
|
```jsonc
|
|
140
144
|
{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
145
|
+
"meta": {
|
|
146
|
+
"url": "https://example.com",
|
|
147
|
+
"analyzedAt": "2026-06-09T19:15:19.000Z",
|
|
148
|
+
"reportVersion": "1.0.0",
|
|
149
|
+
"featureCount": 7,
|
|
150
|
+
"graphNodeCount": 24,
|
|
151
|
+
"graphEdgeCount": 31,
|
|
152
|
+
"ruleCount": 32,
|
|
153
|
+
},
|
|
154
|
+
"summary": {
|
|
155
|
+
"score": "moderate", // "good" | "moderate" | "poor"
|
|
156
|
+
"criticalIssues": 2,
|
|
157
|
+
"warnings": 5,
|
|
158
|
+
"infos": 3,
|
|
159
|
+
"topIssues": [
|
|
160
|
+
{
|
|
161
|
+
"id": "js-long-task",
|
|
162
|
+
"label": "Long task",
|
|
163
|
+
"severity": "critical",
|
|
164
|
+
"confidence": "strong",
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
"issues": [
|
|
169
|
+
{
|
|
170
|
+
"id": "lcp-slow",
|
|
171
|
+
"label": "LCP exceeds 2.5s threshold",
|
|
172
|
+
"severity": "critical",
|
|
173
|
+
"value": 4320,
|
|
174
|
+
"unit": "ms",
|
|
175
|
+
"threshold": 2500,
|
|
176
|
+
"confidence": "strong",
|
|
177
|
+
"remediation": "Optimize largest contentful paint element...",
|
|
178
|
+
"chainId": "lcp:3",
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
"chains": [
|
|
182
|
+
{
|
|
183
|
+
"id": "lcp:3",
|
|
184
|
+
"rootCause": "LCP > 2.5s",
|
|
185
|
+
"impact": "Poor user experience",
|
|
186
|
+
"path": [
|
|
187
|
+
"TTFB delayed by server response",
|
|
188
|
+
"Render-blocking stylesheets",
|
|
189
|
+
"LCP element render delay",
|
|
190
|
+
],
|
|
191
|
+
"length": 3,
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
"recommendations": [
|
|
195
|
+
{
|
|
196
|
+
"priority": "critical",
|
|
197
|
+
"category": "LCP",
|
|
198
|
+
"title": "Optimize Largest Contentful Paint",
|
|
199
|
+
"action": "Inline critical styles, defer non-critical CSS",
|
|
200
|
+
"expectedImpact": "Reduces LCP by ~40%",
|
|
201
|
+
"relatedIssues": ["lcp-slow"],
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
"features": {
|
|
205
|
+
/* raw extracted features for cross-referencing */
|
|
206
|
+
},
|
|
203
207
|
}
|
|
204
208
|
```
|
|
205
209
|
|