Comments (4)
@lucasmartins Great. If you are only sending metrics in your tests there actually is a test mode already although it isn't currently documented. You can just set your classes up to use the test persistor and metrics will be written to memory instead of being sent to Librato.
Here's an example of how we use that internally.
Alternately if you want to stub other requests since we're using faraday under the hood you should be able to use the faraday stub support.
You can assign a default faraday adapter for use with Librato::Metrics.faraday_adapter=
or specify it per client object. I haven't actually used this for stub support yet but it should either work or be a pretty trivial code change to get it working.
All of that said we definitely welcome improvements in any form. A PR to improve testability or improve documentation around how the library works for testing would be great!
from librato-metrics.
Just wanted to follow back up on this. Any further thoughts?
from librato-metrics.
Sorry, I've lost myself at the notification page.
The test persistor looks perfect for my case, I've overridden some Librato methods for the time being, but I'm looking forward to chage my code to use this.
Thanks a lot for the reply, when I change my code I'll write something for the Wiki.
Cheers!
from librato-metrics.
Great, sounds good!
from librato-metrics.
Related Issues (20)
- Drop support for ruby 1.8 HOT 7
- Incrementing Counters (similar to Librato Rails gem) HOT 2
- Support a default source for measurements HOT 2
- Allow proxy configuration HOT 1
- Annotate gets a start_time before the end_time HOT 11
- Road to 2.0 HOT 3
- What is jruby-openssl needed for? HOT 2
- Fake Metrics Client HOT 4
- JSON, wrong number of arguments (given 0, expected 1+) HOT 2
- test issue
- Autosubmit Interval failling... HOT 4
- Add warning message before test runs - production data pruned HOT 4
- Deprecate autosubmit support
- Multidimensional check is not always correct
- Please relax Faraday on 1.x branch HOT 7
- V2 references Faraday::Error::ConnectionFailed, which doesn't exist in newer versions of Faraday
- uninitialized constant Faraday::Response::Middleware (NameError) HOT 1
- Fetch response is case insensitive HOT 3
- Allow Queue to be submitted asynchronously HOT 3
- Librato::Client#metrics can't paginate, filter by tag or compose queries HOT 3
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 librato-metrics.