Skip to content

Commit

Permalink
FIX: Fix StreamLog when dynamic TTY is smaller than output
Browse files Browse the repository at this point in the history
  • Loading branch information
Llorx committed Aug 23, 2023
1 parent 85b0250 commit e0336da
Show file tree
Hide file tree
Showing 12 changed files with 318 additions and 256 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iso-bench",
"version": "2.4.2",
"version": "2.4.4",
"description": "Small benchmark library focused in avoiding optimization/deoptimization pollution between tests by isolating them.",
"types": "./lib/_types/index.d.ts",
"main": "./lib/",
Expand Down
7 changes: 0 additions & 7 deletions src/STRINGS.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/Test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import STREAM from "stream";
import CHILD_PROCESS from "child_process";

import { STRINGS } from "./STRINGS";
import { Fork } from "./Fork";
import { IsoBenchOptions, Processor } from ".";
import { SetupMessage } from "./WorkerSetup";
Expand Down Expand Up @@ -33,7 +32,7 @@ class ForkContext<T> {
warmUpTime: this._options.warmUpTime
};
const worker = Fork.fork({
[STRINGS.ISO_BENCH_SETUP]: JSON.stringify(setup)
["ISO_BENCH_SETUP"]: JSON.stringify(setup)
});
this._listenForCompletionMessage(worker.stdio[3] as STREAM.Readable);
this._listenForProcessExit(worker);
Expand Down
6 changes: 2 additions & 4 deletions src/WorkerSetup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { STRINGS } from "./STRINGS";

export type SetupMessage = {
testI:number;
benchName:string;
Expand All @@ -10,9 +8,9 @@ export type SetupMessage = {
};

export let WorkerSetup:SetupMessage|null = null;
if (process.env[STRINGS.ISO_BENCH_SETUP]) {
if (process.env["ISO_BENCH_SETUP"]) {
try {
WorkerSetup = JSON.parse(process.env[STRINGS.ISO_BENCH_SETUP]!);
WorkerSetup = JSON.parse(process.env["ISO_BENCH_SETUP"]!);
} catch (e) {
WorkerSetup = null;
}
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from "./IsoBench";
export * from "./Processor";
export * from "./STRINGS";
export * from "./Test";
export * from "./Fork";
export * from "./WorkerSetup";
241 changes: 0 additions & 241 deletions src/processors/StreamLog.ts

This file was deleted.

Loading

0 comments on commit e0336da

Please sign in to comment.