Comments (2)
Two reasons:
- First of all, we want to make sure the StatsD packet is actually generated inside the code block of the
assert
call, not before or after. So we should only capture inside the block. - Second: our test suite is big, and we generate lots of StatsD calls. This would require a lot of memory during the test run as we accumulate thousands of metrics.
In RSpec, I'd expect something like expect { ... }.to generate_statsd_call(...)
. You can easily do the same trick with the block here.
from statsd-instrument.
Valid points, thanks for the quick response!
from statsd-instrument.
Related Issues (20)
- NoMethodError: undefined method shopifycloud.assets.upload_threads:1|c' for nil:NilClass HOT 3
- Rails instrumentation with meta programming is not happening HOT 1
- Add option to intercept tags HOT 1
- Rubocop has dropped support for Ruby 2.3 HOT 2
- assertion calls with no_prefix: true will set the expectation name to nil instead of just keeping the name
- assert_statsd_increment errors from 2.1.1 and above HOT 11
- BatchedUDPSink: flush on exit should be improve
- ThreadError: can't alloc thread HOT 9
- Memory leak when using BatchedUDPSink HOT 1
- Datadog format leaves # characters when no labels are set HOT 1
- trigger_statsd_increment does not support multiple calls with different tags
- Rails reload fails when instrumenting class methods in config/initializers HOT 1
- Test false-positive when tags are updated after metric is aleady emitted. HOT 1
- Rubocop Cop for nested assertions HOT 1
- Some metrics are being skipped on rescuing Timeout Error HOT 3
- Datadog Origin Detection support? HOT 6
- Closed
- `ArgumentError` in Ruby 3 when instrumenting method with positional and keyword arguments HOT 2
- Prefix cannot be removed once set
- `normalize_tags` is quite expensive in aggregate. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from statsd-instrument.