web-perf-test
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -42,2 +42,3 @@ #!/usr/bin/env node | ||
var stats = require("simple-statistics"); | ||
var normalizeUrl = require("normalize-url"); | ||
var boxplot_1 = require("./boxplot"); | ||
@@ -216,5 +217,14 @@ var _a = require('../../package.json'), description = _a.description, version = _a.version; | ||
} | ||
function ensureUrl(url) { | ||
return normalizeUrl(url, { | ||
stripWWW: false, | ||
stripFragment: false, | ||
removeTrailingSlash: false, | ||
removeQueryParameters: [], | ||
sortQueryParameters: false, | ||
}); | ||
} | ||
function main() { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var err_1; | ||
var url, err_1; | ||
return __generator(this, function (_a) { | ||
@@ -224,3 +234,5 @@ switch (_a.label) { | ||
_a.trys.push([0, 2, , 3]); | ||
return [4 /*yield*/, measureAverageLoadTime(args.url, !args.showChrome)]; | ||
url = ensureUrl(args.url); | ||
console.log("Measure " + url); | ||
return [4 /*yield*/, measureAverageLoadTime(url, !args.showChrome)]; | ||
case 1: | ||
@@ -227,0 +239,0 @@ _a.sent(); |
{ | ||
"name": "web-perf-test", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Automated web performance test using Puppeteer.", | ||
@@ -21,3 +21,4 @@ "main": "build/src/index.js", | ||
"pretest": "npm run compile", | ||
"posttest": "npm run check" | ||
"posttest": "npm run check && npm run license-check", | ||
"license-check": "jsgl --local ." | ||
}, | ||
@@ -35,4 +36,6 @@ "keywords": [ | ||
"@types/node": "^9.3.0", | ||
"@types/normalize-url": "^1.9.1", | ||
"@types/puppeteer": "^0.13.9", | ||
"gts": "^0.5.3", | ||
"js-green-licenses": "^0.4.0", | ||
"typescript": "^2.6.2" | ||
@@ -42,2 +45,3 @@ }, | ||
"argparse": "^1.0.9", | ||
"normalize-url": "^2.0.1", | ||
"puppeteer": "^1.0.0", | ||
@@ -44,0 +48,0 @@ "simple-statistics": "^5.2.1" |
@@ -10,2 +10,8 @@ # `web-perf-test`: Web performance measuring tool using Puppeteer | ||
## Installation | ||
```shell | ||
$ npm install -g web-perf-test | ||
``` | ||
## Usage | ||
@@ -12,0 +18,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34930
310
58
4
7
+ Addednormalize-url@^2.0.1
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addednormalize-url@2.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedprepend-http@2.0.0(transitive)
+ Addedquery-string@5.1.1(transitive)
+ Addedsort-keys@2.0.0(transitive)
+ Addedstrict-uri-encode@1.1.0(transitive)