8000 Fix/improve benchmarks stability by art049 · Pull Request #7 · art049/prisma · GitHub
[go: up one dir, main page]

Skip to content

Fix/improve benchmarks stability - #7

Open
art049 wants to merge 101 commits into
mainfrom
fix/improve-benchmarks-stability
Open

art049 wants to merge 101 commits into
mainfrom
fix/improve-benchmarks-stability

Conversation

@art049
@art049 art049 commented Apr 13, 2023
Copy link
Copy Markdown
Owner

No description provided.

8000
@codspeed
codspeed Bot commented Apr 13, 2023 •
Copy link
Copy Markdown

CodSpeed Performance Report

Merging #7 fix/improve-benchmarks-stability (88daa37) will improve performances by ×710.

Summary

🔥 1 improvements
❌ 0 regressions
✅ 2 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

Benchmarks breakdown

Benchmark main fix/improve-benchmarks-stability Change
🔥 typescript compilation ~50 Models 133,079.7 ms 187.4 ms ×710

@art049
art049 force-pushed the fix/improve-benchmarks-stability branch from 88daa37 to 1f0c40f Compare April 13, 2023 11:19
Druue and others added 26 commits April 14, 2023 00:02
```
/Users/aqrln/prisma/prisma/packages/client/src/__tests__/integration/happy/signals/__helpers__/client.ts
  9:3  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/Users/aqrln/prisma/prisma/packages/client/src/generation/Cache.test.ts
  32:20  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods
  41:20  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods

/Users/aqrln/prisma/prisma/packages/client/src/runtime/core/compositeProxy/cacheProperties.test.ts
  18:28  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods
  59:28  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods

/Users/aqrln/prisma/prisma/packages/client/tests/e2e/nextjs-schema-not-found/18_monorepo-serverComponents-customOutput-reExportIndirect-ts/packages/service/app/test/[id]/page.tsx
  3:8  error  Async function 'generateStaticParams' has no 'await' expression  @typescript-eslint/require-await

/Users/aqrln/prisma/prisma/packages/client/tests/functional/relationMode-in-separate-gh-action/tests_m-to-n.ts
  1:1  error  Run autofix to sort these imports!  simple-import-sort/imports

/Users/aqrln/prisma/prisma/packages/engine-core/src/tracing/index.ts
  1:1  error  Run autofix to sort these exports!  simple-import-sort/exports

/Users/aqrln/prisma/prisma/packages/internals/src/utils/callOnce.test.ts
  20:19  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods
  30:19  error  Replace toBeCalledTimes() with its canonical name of toHaveBeenCalledTimes()  jest/no-alias-methods
```
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
Co-authored-by: Alexey Orlenko <alex@aqrln.net>
Co-authored-by: Alexey Orlenko <alex@aqrln.net>
…59783dedd129 (prisma#18757)

* chore(deps): update engines to 4.13.0-40.5a83cdfb84729117ca82344e1c7359783dedd129

* fix snapshots

---------

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…ode (prisma#18756)

We now can use shortcut we added as a fix for prisma#18568 to similify JSON
protocol serialization code a bit.
…a#18754)

* refactor
- consolidate stopgaps in one describe
- comments for dbpull/getWarningMessage

* stopgap 35 + test

* feat(migrate): leverage hierarchical describe blocks in tests, add missing space

* Update 35 snapshot for spacing

* Schema comment for deferred constraints

---------

Co-authored-by: jkomyno <skiabo97@gmail.com>
* Added type support for comments warning\nTest case for models & fields

* Added test case for views & fields

* Added test case for types (enums)\nUpdated snapshots per prisma#3884 in engines

* Update 36/3 snapshot: include comments

* Update 36/4 snapshot: mysql tests

* mysql snapshot

* Added 36/5: cockroach db tests models & fields

* Fix formatting for code 36 rendering

* remove breaking characters

* views fs .snap(shot)

* Put comments suite in stopgap section. Formatting

* test naming update : 27

* Update packages/migrate/src/__tests__/DbPull.test.ts

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>

* doc for AffectedObject

---------

Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
…a#18029)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…61340699fe8 (prisma#18830)

* chore(deps): update engines to 4.14.0-5.42f41a6b56b624455bc4e01883e1661340699fe8

* Update snapshots

* Update more snapshots

---------

Co-authored-by: Sergey Tatarintsev <tatarintsev@prisma.io>
* perf(client): Remove `mappings` from base dmmf

Fix prisma/client-planning#320

* Better error for graphql action

* Add test for unsupported action

* Skip test on edge client
aqrln and others added 30 commits April 30, 2023 21:21
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(client): Merge client and engines-core packages

Moves most of `engine-core` package into `core/runtime/engine`
subdirectory of the client.
Moves some utitlites from the `engine-core` into various `internals` sub
modules.

This allows us to use `internals` helpers within what used to be
`engines-core` code. In the future, it would also allow us to simplify
the code by reusing some of the client-side abstractions.

Fix prisma/client-planning#358
Unblock prisma/client-planning#340

* Polyfill performance for Node 14

* Fix CODEOWNERS
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…18e (prisma#19043)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Address some of the feedback added to prisma#18900 after it got merged
…prisma#18453)

* refactor: remove unimplemented `all-exist` test from packages/engines

The functionality that it was probably attempting to test judging from
its name is already tested elsewhere (we have relevant tests in
`fetch-engine` and `internals`).

* fix: allow no tests
Follow-up to prisma/prisma-engines#3939

Pushing this functionality to the engine side prevents the possibility
of some other server grabbing the free port between the time a free
port was found on the client side and the server is bound on the
engine side. Asking the kernel for a free port and binding the server
to that port needs to happen as a single indivisible operation. See
the referenced PR description for additional details.

An example of a recent failure on CI today due to this issue:
https://github.com/prisma/prisma/actions/runs/4871460934/jobs/8688448247
In the constructor, we spend some time indexing all models and types
by their name, which on a larger schemas has an impact on startup
performance. This PR replaces base-dmmf with a set of 3 pre-indexed
maps.

For backward compatibility, `Prisma.dmmf` export will be lazily computed
using runtime datamodel if requested.

Close prisma/client-planning#321
Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
`dmmfToRuntimeDataModel` is not exported from runitme and is not
used in generated client, but was imported. This causes an error for
`edge-esm` runtime, used by Deno.
…19050)

`arg` is not used by any of the runtime dependencies but was
not tree-shaked because it is not marked as side effects free and
some `internals` helpers required it.

`lz-string` is not used by any runtime except edge/data-proxy but
was still bundled.

That saves around 8KB from a bundle size, but unfortinately has no
visible effect on performance.

Close prisma/client-plannning#342
* test(client): Test default selection contents

Should help to prevent issues like prisma#18148

* Add case for enum lists
Removes all @opentelemetry packages from client bundle.
Client would now interact with OTEL throgh type-only `TracingHelper`
dependency. Actual implementation is provided by
`@prisma/instrumentation` package. Technically it works like this:

- `@prisma/internals` package contains type definition for
  `TracingHelper` interface. This interface describes all OTEL functions
  client might need. `runInChildSpan`, `getTraceParent` and `createSpan`
  functions moved there.
- `@prisma/client` contains no-op `TracingHelper` implementation. It
  will be used if tracing is not active (either through disabled preview
  feature or through absence of instrumentation package).
- `@prisma/instrumentation` contains active implementation of
  `TracingHelper`. It is set on a global `PRISMA_INSTRUMENTATION`
  instead of the config. When active, client will use that
  implementation instead of no-op one.

Close prisma/client-planning#340
Note: the migrate package also handles introspection
Run all bechmarks and only print failures rather than exiting as soon
as one benchmark fails, and only then throw an error if there were
failures. This makes the benchmark runner behave more similarly to a
test runner, and it will prevent CodSpeed from marking other
benchmarks as "dropped" when one of them crashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0