cbrowser 7.4.17 ā 7.4.18
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/dist/cli.js +13 -0
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server-remote.d.ts.map +1 -1
- package/dist/mcp-server-remote.js +11 -7
- package/dist/mcp-server-remote.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +9 -5
- package/dist/mcp-server.js.map +1 -1
- package/dist/performance/metrics.d.ts +9 -3
- package/dist/performance/metrics.d.ts.map +1 -1
- package/dist/performance/metrics.js +106 -10
- package/dist/performance/metrics.js.map +1 -1
- package/dist/types.d.ts +35 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -200,12 +200,14 @@ PERFORMANCE REGRESSION (v6.4.0)
|
|
|
200
200
|
perf-baseline delete <name> Delete a baseline
|
|
201
201
|
|
|
202
202
|
perf-regression <url> <baseline> Compare current performance against baseline
|
|
203
|
+
--sensitivity <level> strict|normal|lenient (default: normal)
|
|
203
204
|
--threshold-lcp <n> Max LCP increase % (default: 20)
|
|
204
205
|
--threshold-cls <n> Max CLS increase (default: 0.1)
|
|
205
206
|
--threshold-fcp <n> Max FCP increase % (default: 20)
|
|
206
207
|
--output <file> Save JSON report to file
|
|
207
208
|
Examples:
|
|
208
209
|
cbrowser perf-regression "https://example.com" homepage
|
|
210
|
+
cbrowser perf-regression "https://example.com" homepage --sensitivity strict
|
|
209
211
|
cbrowser perf-regression "https://example.com" homepage --threshold-lcp 30
|
|
210
212
|
|
|
211
213
|
NETWORK / HAR
|
|
@@ -3779,20 +3781,30 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
3779
3781
|
console.error("Usage: cbrowser perf-regression <url> <baseline-name> [options]");
|
|
3780
3782
|
console.error("");
|
|
3781
3783
|
console.error("Options:");
|
|
3784
|
+
console.error(" --sensitivity <level> strict|normal|lenient (default: normal)");
|
|
3782
3785
|
console.error(" --threshold-lcp <n> Max LCP increase % (default: 20)");
|
|
3783
3786
|
console.error(" --threshold-cls <n> Max CLS increase absolute (default: 0.1)");
|
|
3784
3787
|
console.error(" --threshold-fcp <n> Max FCP increase % (default: 20)");
|
|
3785
3788
|
console.error(" --threshold-ttfb <n> Max TTFB increase % (default: 30)");
|
|
3786
3789
|
console.error(" --output <file> Save JSON report to file");
|
|
3787
3790
|
console.error("");
|
|
3791
|
+
console.error("Sensitivity profiles (both % AND absolute must be exceeded):");
|
|
3792
|
+
console.error(" strict: FCP 10%/50ms, LCP 10%/100ms, TTFB 15%/30ms, CLS 10%/0.02");
|
|
3793
|
+
console.error(" normal: FCP 20%/100ms, LCP 20%/200ms, TTFB 20%/50ms, CLS 20%/0.05");
|
|
3794
|
+
console.error(" lenient: FCP 30%/200ms, LCP 30%/400ms, TTFB 30%/100ms, CLS 30%/0.1");
|
|
3795
|
+
console.error("");
|
|
3788
3796
|
console.error("Examples:");
|
|
3789
3797
|
console.error(" cbrowser perf-regression https://example.com homepage");
|
|
3798
|
+
console.error(" cbrowser perf-regression https://example.com homepage --sensitivity strict");
|
|
3799
|
+
console.error(" cbrowser perf-regression https://example.com homepage --sensitivity lenient");
|
|
3790
3800
|
console.error(" cbrowser perf-regression https://example.com homepage --threshold-lcp 30");
|
|
3791
3801
|
process.exit(1);
|
|
3792
3802
|
}
|
|
3803
|
+
const sensitivity = options.sensitivity || "normal";
|
|
3793
3804
|
console.log(`\nš Checking for performance regressions...`);
|
|
3794
3805
|
console.log(` URL: ${url}`);
|
|
3795
3806
|
console.log(` Baseline: ${baselineName}`);
|
|
3807
|
+
console.log(` Sensitivity: ${sensitivity}`);
|
|
3796
3808
|
const thresholds = {};
|
|
3797
3809
|
if (options["threshold-lcp"])
|
|
3798
3810
|
thresholds.lcp = parseInt(options["threshold-lcp"]);
|
|
@@ -3808,6 +3820,7 @@ Documentation: https://github.com/alexandriashai/cbrowser/wiki
|
|
|
3808
3820
|
thresholds.tbt = parseInt(options["threshold-tbt"]);
|
|
3809
3821
|
const regressionOptions = {
|
|
3810
3822
|
headless,
|
|
3823
|
+
sensitivity: sensitivity,
|
|
3811
3824
|
thresholds: Object.keys(thresholds).length > 0 ? thresholds : undefined,
|
|
3812
3825
|
};
|
|
3813
3826
|
try {
|