Skip to content

Commit

Permalink
feat: customize binary path (#300)
Browse files Browse the repository at this point in the history
* feat: customize binary path

* fix: TS/eslint issues
  • Loading branch information
kirillzyusko authored Jul 17, 2024
1 parent f6c097a commit ee9e168
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ import { processOutput as processRamOutput } from "../ram/pollRamUsage";

export const CppProfilerName = `BAMPerfProfiler`;

// Since Flipper uses esbuild, we copy the bin folder directly
// into the Flipper plugin directory
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
const binaryFolder = global.Flipper
? `${__dirname}/bin`
: `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;
const defaultBinaryFolder = `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;
// Allow overriding the binary folder with an environment variable
const binaryFolder = process.env.FLASHLIGHT_BINARY_PATH || defaultBinaryFolder;

export abstract class UnixProfiler implements Profiler {
stop(): void {
Expand Down

0 comments on commit ee9e168

Please sign in to comment.