Skip to content

Commit

Permalink
perf: ⚡️ add script to generate flame graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmannZ committed Oct 16, 2024
1 parent cbef176 commit 5ee4b5b
Show file tree
Hide file tree
Showing 5 changed files with 10,214 additions and 859 deletions.
14 changes: 14 additions & 0 deletions run_flame_ts_proto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

cd ts-proto || exit # Change to the ts-proto directory
pnpm install >/dev/null # Install dependencies
./gen_grpc.sh >/dev/null # Generate the gRPC files
pnpm build >/dev/null # Build the typescript files
pnpm test:flame # Run the benchmarks
cd .. # Change back to the root directory
cd ts-proto-v2 || exit # Change to the ts-proto-v2 directory
pnpm install >/dev/null # Install dependencies
./gen_grpc.sh >/dev/null # Generate the gRPC files
pnpm build >/dev/null # Build the typescript files
pnpm test:flame # Run the benchmarks
cd .. # Change back to the root directory
16 changes: 9 additions & 7 deletions ts-proto-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@
"main": "index.js",
"scripts": {
"build": "tsc",
"test": "node ./build/index.js"
"test": "node ./build/index.js",
"test:flame": "clinic flame -- node ./build/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@faker-js/faker": "^8.4.1",
"@grpc/grpc-js": "^1.11.1",
"@faker-js/faker": "^9.0.3",
"@grpc/grpc-js": "^1.12.2",
"protobufjs": "^7.4.0",
"tinybench": "^2.9.0",
"tslib": "^2.6.3"
"tslib": "^2.8.0"
},
"devDependencies": {
"@types/microtime": "^2.1.2",
"@types/node": "^22.5.0",
"@types/node": "^22.7.5",
"clinic": "^13.0.0",
"grpc-tools": "^1.12.4",
"ts-proto": "^2.0.3",
"typescript": "^5.5.4"
"ts-proto": "^2.2.4",
"typescript": "^5.6.3"
}
}
Loading

0 comments on commit 5ee4b5b

Please sign in to comment.