Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore/fix codpseed flamegraphs #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ jobs:
token: ${{ secrets.CODSPEED_TOKEN }}
env:
CODSPEED_BENCHMARK: true
CODSPEED_DEBUG: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import path from 'path'
import { compileFile } from '../../../utils/compileFile'
import { generateTestClient } from '../../../utils/getTestClient'

console.log('process.execPath', process.execPath)
console.log('process.execArgv', process.execArgv)
console.log('process.argv', process.argv)
console.log('process.env', JSON.stringify(process.env, null, 2))

let suite = withCodSpeed(new Benchmark.Suite('typescript')).add('client generation ~50 Models', {
defer: true,
fn: function (deferred) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import Benchmark from 'benchmark'

import { generateTestClient } from '../../../utils/getTestClient'

console.log('process.execPath', process.execPath)
console.log('process.execArgv', process.execArgv)
console.log('process.argv', process.argv)
console.log('process.env', JSON.stringify(process.env, null, 2))

const suite = withCodSpeed(new Benchmark.Suite('typescript'))
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Expand Down
5 changes: 5 additions & 0 deletions packages/get-platform/bench/get-platform.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import Benchmark from 'benchmark'

import { getBinaryTargetForCurrentPlatformInternal, getos } from '../src/getPlatform'

console.log('process.execPath', process.execPath)
console.log('process.execArgv', process.execArgv)
console.log('process.argv', process.argv)
console.log('process.env', JSON.stringify(process.env, null, 2))

void withCodSpeed(new Benchmark.Suite('get-platform'))
.add('getBinaryTargetForCurrentPlatform', {
defer: true,
Expand Down
3 changes: 3 additions & 0 deletions scripts/bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ async function run(benchmarks: string[]) {
try {
await execa.command(`pnpm tsx ${location}`, {
stdio: 'inherit',
// env: process.env,
// execPath: process.execPath,
execPath: 'node',
})
} catch (e) {
console.error(e)
Expand Down