Skip to content

Commit

Permalink
lint: Update code to latest linter standards
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Clauss <cclauss@me.com>
  • Loading branch information
cclauss authored and godlygeek committed Nov 24, 2023
1 parent 2d3c31e commit f4204bc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ a:hover {
border-right: 0.15em solid #31373e;
white-space: nowrap;
margin: 0 auto;
animation: typing 2.75s steps(40, end), blink-caret 0.75s step-end infinite;
animation:
typing 2.75s steps(40, end),
blink-caret 0.75s step-end infinite;
}

@keyframes typing {
Expand Down
10 changes: 5 additions & 5 deletions src/memray/reporters/assets/common.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "merged thread",
};
expect(makeTooltipString(data, "1KiB", true)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations"
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations",
);
});

Expand All @@ -33,7 +33,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "0x1",
};
expect(makeTooltipString(data, "1KiB", false)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations<br>Thread ID: 0x1"
"File foo.py, line 10 in foo<br>1KiB total<br>3 allocations<br>Thread ID: 0x1",
);
});
test("Generate label with single allocation", () => {
Expand All @@ -43,7 +43,7 @@ describe("Flame graph tooltip generation", () => {
thread_id: "0x1",
};
expect(makeTooltipString(data, "1KiB", false)).toBe(
"File foo.py, line 10 in foo<br>1KiB total<br>1 allocation<br>Thread ID: 0x1"
"File foo.py, line 10 in foo<br>1KiB total<br>1 allocation<br>Thread ID: 0x1",
);
});
});
Expand Down Expand Up @@ -114,8 +114,8 @@ describe("Filter threads", () => {
thread_id: "0x0",
children: [],
},
2
)
2,
),
).toStrictEqual({
thread_id: "0x0",
children: [],
Expand Down
16 changes: 8 additions & 8 deletions src/memray/reporters/assets/temporal_flamegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function findHWMAllocations(
intervals,
node_objects,
hwmSnapshot,
parent_index_by_child_index
parent_index_by_child_index,
) {
intervals.forEach((interval) => {
let [allocBefore, deallocBefore, nodeIndex, count, bytes] = interval;
Expand All @@ -108,7 +108,7 @@ function findLeakedAllocations(
node_objects,
rangeStart,
rangeEnd,
parent_index_by_child_index
parent_index_by_child_index,
) {
intervals.forEach((interval) => {
let [allocBefore, deallocBefore, nodeIndex, count, bytes] = interval;
Expand Down Expand Up @@ -150,7 +150,7 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
" is " +
hwmBytes +
" at " +
hwmSnapshot
hwmSnapshot,
);

let plotUpdate = { shapes: [] };
Expand Down Expand Up @@ -197,14 +197,14 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
flamegraphIntervals,
flamegraphNodeObjects,
hwmSnapshot,
parent_index_by_child_index
parent_index_by_child_index,
);
if (inverted) {
findHWMAllocations(
invertedNoImportsIntervals,
invertedNoImportsNodeObjects,
hwmSnapshot,
inverted_no_imports_parent_index_by_child_index
inverted_no_imports_parent_index_by_child_index,
);
}
} else {
Expand All @@ -215,15 +215,15 @@ function packedDataToTree(packedData, rangeStart, rangeEnd) {
flamegraphNodeObjects,
rangeStart,
rangeEnd,
parent_index_by_child_index
parent_index_by_child_index,
);
if (inverted) {
findLeakedAllocations(
invertedNoImportsIntervals,
invertedNoImportsNodeObjects,
rangeStart,
rangeEnd,
inverted_no_imports_parent_index_by_child_index
inverted_no_imports_parent_index_by_child_index,
);
}
}
Expand Down Expand Up @@ -400,7 +400,7 @@ function main() {
console.log("main");

const unique_threads = packed_data.unique_threads.map(
(tid) => packed_data.strings[tid]
(tid) => packed_data.strings[tid],
);
initThreadsDropdown({ unique_threads: unique_threads }, merge_threads);

Expand Down

0 comments on commit f4204bc

Please sign in to comment.