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.
Files changed (2) hide show
  1. package/README.md +66 -62
  2. 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
+ ![Visitors](https://visitor-badge.laobi.icu/badge?page_id=Be1zebub/PerfGraph)
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
- "meta": {
142
- "url": "https://example.com",
143
- "analyzedAt": "2026-06-09T19:15:19.000Z",
144
- "reportVersion": "1.0.0",
145
- "featureCount": 7,
146
- "graphNodeCount": 24,
147
- "graphEdgeCount": 31,
148
- "ruleCount": 32,
149
- },
150
- "summary": {
151
- "score": "moderate", // "good" | "moderate" | "poor"
152
- "criticalIssues": 2,
153
- "warnings": 5,
154
- "infos": 3,
155
- "topIssues": [
156
- {
157
- "id": "js-long-task",
158
- "label": "Long task",
159
- "severity": "critical",
160
- "confidence": "strong",
161
- },
162
- ],
163
- },
164
- "issues": [
165
- {
166
- "id": "lcp-slow",
167
- "label": "LCP exceeds 2.5s threshold",
168
- "severity": "critical",
169
- "value": 4320,
170
- "unit": "ms",
171
- "threshold": 2500,
172
- "confidence": "strong",
173
- "remediation": "Optimize largest contentful paint element...",
174
- "chainId": "lcp:3",
175
- },
176
- ],
177
- "chains": [
178
- {
179
- "id": "lcp:3",
180
- "rootCause": "LCP > 2.5s",
181
- "impact": "Poor user experience",
182
- "path": [
183
- "TTFB delayed by server response",
184
- "Render-blocking stylesheets",
185
- "LCP element render delay",
186
- ],
187
- "length": 3,
188
- },
189
- ],
190
- "recommendations": [
191
- {
192
- "priority": "critical",
193
- "category": "LCP",
194
- "title": "Optimize Largest Contentful Paint",
195
- "action": "Inline critical styles, defer non-critical CSS",
196
- "expectedImpact": "Reduces LCP by ~40%",
197
- "relatedIssues": ["lcp-slow"],
198
- },
199
- ],
200
- "features": {
201
- /* raw extracted features for cross-referencing */
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perfgraph",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "CDP-powered perf CLI — causal degradation graphs, not just Lighthouse scores",
6
6
  "license": "MIT",