Skip to content

Commit

Permalink
Put test results in a file for parsing by pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonWeber committed Sep 27, 2024
1 parent 0f9d7a1 commit 74455b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/performanceTests/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
import { createPerfProgram } from "@azure-tools/test-perf";
import { TrackDependencyTest } from "./trackDependency.spec.js";
import { TrackTraceTest } from "./trackTrace.spec.js";
import fs from "fs";
import util from "util";

// Write console logs to file for parsing
const logFile = fs.createWriteStream("perf.log", { flags: "a" });
const logStdout = process.stdout;
console.log = function() {
logFile.write(util.format.apply(null, arguments) + '\n');
logStdout.write(util.format.apply(null, arguments) + '\n');
};
const perfProgram = createPerfProgram(TrackDependencyTest, TrackTraceTest);
perfProgram.run();

0 comments on commit 74455b7

Please sign in to comment.