Skip to content

Commit

Permalink
v1.3.2: Add nextHopProtocol data
Browse files Browse the repository at this point in the history
  • Loading branch information
nicjansma committed Aug 30, 2022
1 parent 3b86cf9 commit fe3254f
Show file tree
Hide file tree
Showing 11 changed files with 6,289 additions and 1,389 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# resourcetiming-compression.js

v1.3.1
v1.3.2

[http://nicj.net](http://nicj.net)

Expand Down Expand Up @@ -230,6 +230,7 @@ The special data types are:
* `4`: `<link rel=>` value
* `5`: Namespaced data
* `6`: Service Worker Start time
* `7`: `nextHopProtocol` data

Details about each special data follows.

Expand Down Expand Up @@ -509,6 +510,20 @@ Results in:
* `workerStart` = `parseInt("2", 36) + startTime` = `3`
* `fetchStart` = `parseInt("3", 36) + startTime` = `4`

### `nextHopProtocol` data

ResourceTiming's [`nextHopProtocol`](https://www.w3.org/TR/resource-timing-2/#dom-performanceresourcetiming-nexthopprotocol)
is the final connection's ALPN negotiated protocol, such as `http/1.1`, `h2` or `h3`.

Note: `http/` is replaced with `h` so `http/1` is consistent with H2 and H3.

The data will be appended to the list of timings with
a special prefix of `*7`:

```
*7[h1|h1.1|h2|h3|...]
```

### Resource Contributions

We call contribution of a resource to a page the proportion of the total load time that can be blamed on that resource.
Expand Down Expand Up @@ -560,6 +575,9 @@ Or via ``gulp``:

## Version History

* v1.3.2 - 2022-08-30
* Add `nextHopProtocol` data
* Upgrade some package dependencies
* v1.3.1 - 2020-08-05
* Add `fetchStart` for Service Worker Startup data
* v1.3.0 - 2020-07-09
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resourcetiming-compression",
"version": "1.3.1",
"version": "1.3.2",
"homepage": "https://github.com/nicjansma/resourcetiming-compression.js",
"authors": [
"Nic Jansma <nic@nicj.net>",
Expand Down
2 changes: 1 addition & 1 deletion dist/resourcetiming-compression.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/resourcetiming-decompression.min.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
var fs = require("fs");

gulp.task("lint", function() {
gulp.src(["*.js", "src/*.js", "test/*.js"])
return gulp.src(["*.js", "src/*.js", "test/*.js"])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task("lint:build", function() {
gulp.src(["*.js", "src/*.js", "test/*.js"])
return gulp.src(["*.js", "src/*.js", "test/*.js"])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.format("checkstyle", fs.createWriteStream("eslint.xml")));
});

gulp.task("compress", function() {
gulp.src("src/*.js")
return gulp.src("src/*.js")
.pipe(rename({
suffix: ".min"
}))
Expand All @@ -41,26 +41,26 @@
.pipe(mocha());
});

gulp.task("mocha-tap", ["mocha"], function() {
gulp.task("mocha-tap", function() {
return gulp.src("test/test-*.js",
{
read: false
})
.pipe(mocha({
reporter: "tap",
output: "./test/mocha.tap"
}));
.pipe(mocha({
reporter: "tap",
output: "./test/mocha.tap"
}));
});

gulp.task("karma", ["mocha", "mocha-tap"], function(done) {
gulp.task("karma", function(done) {
new Server({
configFile: path.join(__dirname, "karma.config.js"),
singleRun: true
}, done).start();
});

gulp.task("all", ["default"]);
gulp.task("test", ["mocha", "mocha-tap", "karma"]);
gulp.task("default", ["lint", "lint:build", "compress", "test"]);
gulp.task("travis", ["default"]);
gulp.task("test", gulp.series("mocha", "mocha-tap", "karma"));
gulp.task("default", gulp.series("lint", "lint:build", "compress", "test"));
gulp.task("all", gulp.series("default"));
gulp.task("travis", gulp.series("default"));
}());
Loading

0 comments on commit fe3254f

Please sign in to comment.