Skip to content

Instantly share code, notes, and snippets.

View gregtatum's full-sized avatar

Greg Tatum gregtatum

View GitHub Profile
// https://tcchd.maps.arcgis.com/apps/opsdashboard/index.html#/ebb119cd215b4c57933b7fbe477e7c30
// ​[fill="#ffaa00"]
// [aria-label="Cases Mar 23, 2020 23"]
const caseFill = "#ffaa00";
{
const data = $$("[aria-label]")
.filter(el => el.getAttribute("fill") === caseFill)
.map(el => el.getAttribute("aria-label"))
.map(label => label.match(/^Cases (\w+ \d+, \d+) (\d+)/))
diff --git a/mach b/mach
--- a/mach
+++ b/mach
@@ -83,19 +83,19 @@ py2commands="
run_py() {
# Try to run a specific Python interpreter. Fall back to the system
# default Python if the specific interpreter couldn't be found.
py_executable="$1"
shift
@gregtatum
gregtatum / profiler.py
Created May 12, 2020 21:22
cProfile in Python to Gecko Profiler
import cProfile, pstats, StringIO, pdb, json
def func_a(n, l):
if (n > l / 2):
return func_b(n)
else:
return func_c(n)
def func_b(n):
diff --git a/src/components/stack-chart/Canvas.js b/src/components/stack-chart/Canvas.js
index c7d71e30..a5a1fe0b 100644
--- a/src/components/stack-chart/Canvas.js
+++ b/src/components/stack-chart/Canvas.js
@@ -420,8 +420,14 @@ class StackChartCanvas extends React.PureComponent<Props> {
const stackTiming = stackTimingByDepth[depth];
- if (!stackTiming.callNode) {
- return null;
diff --git a/src/components/stack-chart/Canvas.js b/src/components/stack-chart/Canvas.js
index 808669c7..8a29aee8 100644
--- a/src/components/stack-chart/Canvas.js
+++ b/src/components/stack-chart/Canvas.js
@@ -20,6 +20,7 @@ import TextMeasurement from '../../utils/text-measurement';
import { formatMilliseconds } from '../../utils/format-numbers';
import { updatePreviewSelection } from '../../actions/profile-view';
import { mapCategoryColorNameToStackChartStyles } from '../../utils/colors';
+// Add TooltipMarker
import { TooltipCallNode } from '../tooltip/CallNode';
diff --git a/src/components/app/UrlManager.js b/src/components/app/UrlManager.js
index 6c12908a..82d7e868 100644
--- a/src/components/app/UrlManager.js
+++ b/src/components/app/UrlManager.js
@@ -8,7 +8,11 @@ import * as React from 'react';
import explicitConnect from '../../utils/connect';
import { getIsUrlSetupDone } from '../../selectors/app';
import { updateUrlState, urlSetupDone, show404 } from '../../actions/app';
-import { urlFromState, stateFromLocation } from '../../app-logic/url-handling';
+import {
diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp
--- a/dom/performance/Performance.cpp
+++ b/dom/performance/Performance.cpp
@@ -215,20 +215,68 @@ void Performance::Mark(const nsAString&
}
RefPtr<PerformanceMark> performanceMark =
new PerformanceMark(GetParentObject(), aName, Now());
InsertUserEntry(performanceMark);
// Use this on profiles to extract screenshot and arbitrary marker information.
// Example profile: https://perfht.ml/2T7kA2i
function getMarkersByName(thread, name) {
const { markers, stringTable } = thread;
const stringIndex = stringTable.indexForString(name);
const results = [];
for (let markerIndex = 0; markerIndex < markers.length; markerIndex++) {
if (markers.name[markerIndex] === stringIndex) {
results.push({
@gregtatum
gregtatum / traceLoggerDictionary.json
Created September 11, 2018 19:01
traceLoggerDictionary
[
"TraceLogger failed to process text",
"TraceLogger overhead",
"AnnotateScripts",
"Baseline",
"BaselineCompilation",
"Engine",
"GC",
"GCAllocation",
"GCSweeping",