This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useMemo, useRef } from "react"; | |
import { v4 as uuid } from "uuid"; | |
const renderCounter: { [id: string]: number | undefined } = {}; | |
const incrementRenderCount = (id: string) => { | |
const next = (renderCounter[id] ?? 0) + 1; | |
renderCounter[id] = next; | |
return next; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// node ./slow-appium-commands.js <log file> | |
// | |
// If your logs contain ANSI colour tags (ie downloaded from semaphore), first strip with | |
// sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g" <log file> | |
const fs = require("fs"); | |
// any webdriver commands which took longer than this will be logged | |
const THRESHOLD = 5000; // ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Async stack traces are often a bit useless - there is a max depth after which context is lost. | |
// This is a rather hacky attempt to maintain the full stack. | |
// https://github.com/sindresorhus/got/blob/main/documentation/async-stack-traces.md | |
// https://github.com/nodejs/node/issues/36126 | |
const asyncHooks = require("async_hooks"); | |
const traces = new Map(); | |
asyncHooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"isDefault": false, | |
"name": "Momentum2", | |
"gains": { | |
"global": 0, | |
"bands": [ | |
-6.6, | |
-3.6, | |
-3.4, |
OlderNewer