Fix benchmarks with NODE_PATH and common/browser imports (#5985)
PR #5966 switched benchmark imports to ../../src/ paths that do not resolve at runtime. Restore common/* and browser/* imports (with benchmark-only tsconfig paths for typechecking) and NODE_PATH=./out on benchmark npm scripts so emitted requires resolve against out/. Fixes #5970 Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Cursor Agent
Daniel Imms
parent
a250987508
commit
1f054097f3
+3
-3
@@ -61,9 +61,9 @@
|
||||
"test-integration-firefox": "node ./bin/test_integration.js --workers=75% \"--project=FirefoxStable\"",
|
||||
"test-integration-webkit": "node ./bin/test_integration.js --workers=75% \"--project=WebKit\"",
|
||||
"test-integration-debug": "node ./bin/test_integration.js --workers=1 --headed --timeout=30000",
|
||||
"benchmark": "xterm-benchmark -r 5 -c test/benchmark/benchmark.json",
|
||||
"benchmark-baseline": "xterm-benchmark -r 5 -c test/benchmark/benchmark.json --baseline out-test/benchmark/*benchmark.js",
|
||||
"benchmark-eval": "xterm-benchmark -r 5 -c test/benchmark/benchmark.json --eval out-test/benchmark/*benchmark.js",
|
||||
"benchmark": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json",
|
||||
"benchmark-baseline": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json --baseline out-test/benchmark/*benchmark.js",
|
||||
"benchmark-eval": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json --eval out-test/benchmark/*benchmark.js",
|
||||
"clean": "rm -rf lib out addons/*/lib addons/*/out",
|
||||
"vtfeatures": "node bin/extract_vtfeatures.js src/*/*.ts src/*/*/*.ts src/*.ts addons/**/src/*.ts",
|
||||
"prepackage": "npm run build",
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
import { perfContext, before, RuntimeCase } from 'xterm-benchmark';
|
||||
import { DecorationService } from '../../src/common/services/DecorationService';
|
||||
import { MockLogService, MockBufferService, MockOptionsService } from '../../src/common/TestUtils.test';
|
||||
import { DecorationService } from 'common/services/DecorationService';
|
||||
import { MockLogService, MockBufferService, MockOptionsService } from 'common/TestUtils.test';
|
||||
const enum Constants {
|
||||
COLS = 80,
|
||||
ROWS = 30,
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
*/
|
||||
import { perfContext, before, beforeEach, ThroughputRuntimeCase } from 'xterm-benchmark';
|
||||
|
||||
import { EscapeSequenceParser } from '../../src/common/parser/EscapeSequenceParser';
|
||||
import { C0, C1 } from '../../src/common/data/EscapeSequences';
|
||||
import { IDcsHandler, IOscHandler, IApcHandler, IParams } from '../../src/common/parser/Types';
|
||||
import { OscHandler } from '../../src/common/parser/OscParser';
|
||||
import { DcsHandler } from '../../src/common/parser/DcsParser';
|
||||
import { ApcHandler } from '../../src/common/parser/ApcParser';
|
||||
import { EscapeSequenceParser } from 'common/parser/EscapeSequenceParser';
|
||||
import { C0, C1 } from 'common/data/EscapeSequences';
|
||||
import { IDcsHandler, IOscHandler, IApcHandler, IParams } from 'common/parser/Types';
|
||||
import { OscHandler } from 'common/parser/OscParser';
|
||||
import { DcsHandler } from 'common/parser/DcsParser';
|
||||
import { ApcHandler } from 'common/parser/ApcParser';
|
||||
|
||||
const SIZE = 5000000;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
import { perfContext, before, RuntimeCase } from 'xterm-benchmark';
|
||||
import { Emitter } from '../../src/common/Event';
|
||||
import { Emitter } from 'common/Event';
|
||||
|
||||
const ITERATIONS = 1_000_000;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { perfContext, before, ThroughputRuntimeCase } from 'xterm-benchmark';
|
||||
|
||||
import { spawn } from 'node-pty';
|
||||
import { Utf8ToUtf32, stringFromCodePoint } from '../../src/common/input/TextDecoder';
|
||||
import { CoreBrowserTerminal } from '../../src/browser/CoreBrowserTerminal';
|
||||
import { Utf8ToUtf32, stringFromCodePoint } from 'common/input/TextDecoder';
|
||||
import { CoreBrowserTerminal } from 'browser/CoreBrowserTerminal';
|
||||
|
||||
perfContext('Terminal: ls -lR /usr/lib', () => {
|
||||
let content = '';
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
"moduleResolution": "nodenext",
|
||||
"strict": false,
|
||||
"target": "es2021",
|
||||
"module": "nodenext"
|
||||
"module": "nodenext",
|
||||
"paths": {
|
||||
"common/*": ["../../src/common/*"],
|
||||
"browser/*": ["../../src/browser/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./**/*",
|
||||
|
||||
Reference in New Issue
Block a user