Skip to content

Commit 2e32278

Browse files
committed
Add extended performance.measure
1 parent ed92121 commit 2e32278

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

_includes/head.html

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,20 @@
5151
</style>
5252
<script>
5353
performance.mark('cssEnd');
54-
performance.measure('cssTime', 'cssStart', 'cssEnd');
54+
55+
performance.measure('cssTime', {
56+
start: 'cssStart',
57+
end: 'cssEnd',
58+
detail: {
59+
devtools: {
60+
dataType: 'track-entry',
61+
trackGroup: 'csswizardry.com',
62+
track: 'Technical Timings',
63+
tooltipText: 'Main CSS Bundle Parsed',
64+
color: 'secondary-light'
65+
}
66+
}
67+
});
5568
</script>
5669

5770
<script src="https://www.googletagmanager.com/gtag/js?id=G-DNCL1RY4GT" async></script>
@@ -133,5 +146,18 @@
133146

134147
<script>
135148
performance.mark('headEnd');
136-
performance.measure('headTime', 'headStart', 'headEnd');
149+
150+
performance.measure('headTime', {
151+
start: 'headStart',
152+
end: 'headEnd',
153+
detail: {
154+
devtools: {
155+
dataType: 'track-entry',
156+
trackGroup: 'csswizardry.com',
157+
track: 'Technical Timings',
158+
tooltipText: 'Head Tags Parsed',
159+
color: 'secondary-light'
160+
}
161+
}
162+
});
137163
</script>

_layouts/default.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@
1616
{{ content }}
1717

1818
<script>
19-
performance.measure('contentTime', 'contentStart', 'contentEnd');
19+
performance.measure('contentTime', {
20+
start: 'contentStart',
21+
end: 'contentEnd',
22+
detail: {
23+
devtools: {
24+
dataType: 'track-entry',
25+
trackGroup: 'csswizardry.com',
26+
track: 'Technical Timings',
27+
tooltipText: 'Main Content Parsed',
28+
color: 'secondary-light'
29+
}
30+
}
31+
});
2032
</script>
2133

2234
<script>

0 commit comments

Comments
 (0)