Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lexmag/statix
Fast and reliable Elixir client for StatsD-compatible servers
https://github.com/lexmag/statix
elixir instrumentation metrics statsd
Last synced: 3 days ago
JSON representation
Fast and reliable Elixir client for StatsD-compatible servers
- Host: GitHub
- URL: https://github.com/lexmag/statix
- Owner: lexmag
- License: isc
- Created: 2015-05-13T00:05:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T19:25:52.000Z (8 months ago)
- Last Synced: 2025-01-15T05:29:23.435Z (11 days ago)
- Topics: elixir, instrumentation, metrics, statsd
- Language: Elixir
- Homepage: https://hexdocs.pm/statix
- Size: 65.4 KB
- Stars: 277
- Watchers: 10
- Forks: 85
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Expose app metrics in the StatsD protocol. (Third Party APIs)
- fucking-awesome-elixir - statix - Expose app metrics in the StatsD protocol. (Third Party APIs)
- awesome-beam-monitoring - Statix - fast and reliable Elixir client for StatsD-compatible servers with some DogStatsD extensions (namely tags) (Metrics)
- awesome-elixir - statix - Expose app metrics in the StatsD protocol. (Third Party APIs)
README
# Statix
[![CI Status](https://github.com/lexmag/statix/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/lexmag/statix/actions/workflows/ci.yml)
[![Hex Version](https://img.shields.io/hexpm/v/statix.svg "Hex Version")](https://hex.pm/packages/statix)Statix is an Elixir client for StatsD-compatible servers.
It is focused on speed without sacrificing simplicity, completeness, or correctness.What makes Statix the fastest library around:
* direct sending to socket [[1](#direct-sending)]
* caching of the UDP packet header
* connection pooling to distribute the metric sending
* diligent usage of [IO lists](http://jlouisramblings.blogspot.se/2013/07/problematic-traits-in-erlang.html)[1] In contrast with process-based clients, Statix has lower memory consumption and higher throughput – Statix v1.0.0 does about __876640__ counter increments per flush:
![Statix](https://www.dropbox.com/s/uijh5i8qgzmd11a/statix-v1.0.0.png?raw=1)
It is possible to measure that yourself.
```elixir
for _ <- 1..10_000 do
Task.start(fn ->
for _ <- 1..10_000 do
StatixSample.increment("sample", 1)
end
end)
end
```Make sure you have StatsD server running to get more realistic results.
See [the documentation](https://hexdocs.pm/statix) for detailed usage information.
## Installation
Add Statix as a dependency to your `mix.exs` file:
```elixir
defp deps() do
[{:statix, ">= 0.0.0"}]
end
```Then run `mix deps.get` in your shell to fetch the dependencies.
## License
This software is licensed under [the ISC license](LICENSE).