Skip to content

Commit

Permalink
add cwd to output json
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstonmatt committed Dec 27, 2023
1 parent ece3d48 commit c0e026d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.3",
"version": "0.1.0",
"name": "bencher",
"deno_version": "1.39.0",
"tasks": {
Expand Down
4 changes: 3 additions & 1 deletion src/bencher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ type BencheeRecordEntry = {
duration: number;
ts: string;
bencheeCommand: string;
cwd: string;
};

type BencheeRecordEntries = Array<BencheeRecordEntry>;
Expand All @@ -14,7 +15,7 @@ type BencheeRecord = {

export default async function bencher() {
const bencherCommand = await new Command()
.version("0.0.1")
.version("0.1.0")
.name("bencher")
.option("-r,--ref <ref:string>", "git ref of benchee", {
required: true,
Expand Down Expand Up @@ -52,6 +53,7 @@ export default async function bencher() {
duration: entries[0].duration,
ts: new Date().toISOString(),
bencheeCommand: `${bencheePath} ${bencheeArgs.join(" ")}`,
cwd,
};

const outputFilePath = options.output ?? path.join(cwd, "benchee.json");
Expand Down

0 comments on commit c0e026d

Please sign in to comment.