Skip to content

Commit

Permalink
feat(codspeed.io): Try out benchmarking cloud service (#18305)
Browse files Browse the repository at this point in the history
  • Loading branch information
janpio committed Mar 17, 2023
1 parent e027350 commit d04d8cd
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/benchmark.yml
Expand Up @@ -68,6 +68,12 @@ jobs:
- name: Run benchmarks
run: pnpm run bench

- name: Run benchmarks for Codspeed
uses: CodSpeedHQ/action@v1
with:
run: pnpm run bench
token: ${{ secrets.CODSPEED_TOKEN }}

- name: Store benchmark result
if: ${{ github.ref == 'refs/heads/main' }}
uses: rhysd/github-action-benchmark@v1
Expand Down
1 change: 1 addition & 0 deletions packages/client/package.json
Expand Up @@ -62,6 +62,7 @@
"index-browser.js"
],
"devDependencies": {
"@codspeed/benchmark.js-plugin": "1.0.1",
"@faker-js/faker": "7.6.0",
"@fast-check/jest": "1.6.0",
"@jest/globals": "29.4.3",
Expand Down
@@ -1,5 +1,6 @@
// @ts-nocheck

import { withCodSpeed } from '@codspeed/benchmark.js-plugin'
import Benchmark from 'benchmark'
import execa from 'execa'
import fs from 'fs'
Expand All @@ -8,7 +9,7 @@ import path from 'path'
import { compileFile } from '../../../utils/compileFile'
import { generateTestClient } from '../../../utils/getTestClient'

const suite = new Benchmark.Suite('typescript')
const suite = withCodSpeed(new Benchmark.Suite('typescript'))
// @ts-ignore
suite
.add('client generation ~50 Models', {
Expand Down
@@ -1,10 +1,11 @@
// @ts-nocheck

import { withCodSpeed } from '@codspeed/benchmark.js-plugin'
import Benchmark from 'benchmark'

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

const suite = new Benchmark.Suite('typescript')
const suite = withCodSpeed(new Benchmark.Suite('typescript'))
// @ts-ignore
suite
.add('client generation 100 models with relations', {
Expand Down
68 changes: 68 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d04d8cd

Please sign in to comment.