Skip to content

Commit

Permalink
yes
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed Oct 14, 2023
1 parent 8ab28b1 commit e33bb7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench-turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Augment ttft data
run: |
cd benchmark && node -r esbuild-register ./src/ttft-augment.ts ./ttft.json ${{github.run_id}}
cd benchmark && node -r esbuild-register ./src/ttft-augment.ts "$PWD/ttft.json" ${{github.run_id}}
cat ./ttft.json
# - name: Add Github Action Run URL to JSON
Expand Down
10 changes: 8 additions & 2 deletions benchmark/src/ttft-augment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ process.argv.forEach((val, index) => {
console.log({ index, val });
});

const contents = fs.readFileSync("../ttft.json");
const filePath = process.argv[2];
const runID = process.argv[3];

const contents = fs.readFileSync(filePath);
const data = JSON.parse(contents.toString());

const commitDetails = getCommitDetails();

data.commitSha = commitDetails.commitSha;
data.commitTimestamp = commitDetails.commitTimestamp;
data.runID = runID;

fs.writeFileSync("../ttft.json", JSON.stringify(data, null, 2));
fs.writeFileSync(filePath, JSON.stringify(data, null, 2));

0 comments on commit e33bb7d

Please sign in to comment.