# Code-level performance testing

**URL:** <https://meta.discourse.org/t/code-level-performance-testing/282856>\
**Category:** Development\
**Created:** [October 20, 2023, 3:44am UTC](https://meta.discourse.org/t/code-level-performance-testing/282856 "2023-10-20T03:44:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [October 23, 2023, 11:29pm UTC](https://meta.discourse.org/t/code-level-performance-testing/282856/2 "2023-10-23T23:29:59Z")

</div>

My general recommendation is to avoid performance testing in specs.

We have some examples where we try to monitor for N+1s in a spec, but they all tend to be pretty fragile.

Its a very very tough problem with no obvious solution, all solutions come with compromises so we generally avoid this and just monitor production for this kind of stuff.

---

_[View the full topic](https://meta.discourse.org/t/code-level-performance-testing/282856)._
