Skip to content

Commit

Permalink
Support chunks in HTTP2 - Type check
Browse files Browse the repository at this point in the history
  • Loading branch information
radum committed Nov 23, 2021
1 parent 1d8a925 commit 1b405ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/ts/transformers/har.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,11 @@ const getUserTimings = (currPage: Page, options: ChartOptions) => {
/**
* Create `WaterfallEntry`s to represent the sub-timings of a request
* ("blocked", "dns", "connect", "send", "wait", "receive")
* TODO: `harEntry: Entry` Entry interface doesn't have the chunks property and this fails TS.
* I see no benefit in typechecking harEntry IMHO. But to fix this we need to import that interface and update it.
* @param {number} startRelative - Number of milliseconds since page load started (`page.startedDateTime`)
* @param {Entry} harEntry
* @returns Array
*/
const buildDetailTimingBlocks = (startRelative: number, harEntry): WaterfallEntryTiming[] => {
const buildDetailTimingBlocks = (startRelative: number, harEntry: Entry): WaterfallEntryTiming[] => {
const t = harEntry.timings;
const chunks = harEntry._chunks || [];
const types: TimingType[] = ["blocked", "dns", "connect", "send", "wait", "receive"];
Expand Down
1 change: 1 addition & 0 deletions src/ts/waterfall/row/svg-row-subcomponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function makeBlock(rectData: RectData, className: string) {
function makeChunkBlock(chunkData, rectData: RectData, className: string) {
const holder = svg.newG("");
const blockHeight = rectData.height - 1;
// TODO: Once we have a way to pass the available bandwidth we can calculate the length for each chunk.
// const blockWidth = chunkData.ts - (chunkData.bytes / (5000000 / 8.0));
const rectX = misc.roundNumber(chunkData.ts / rectData.unit) + "%";
const rect = svg.newRect({
Expand Down

0 comments on commit 1b405ec

Please sign in to comment.