• Stars
    star
    4
  • Rank 3,304,323 (Top 66 %)
  • Language
    Zig
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Basic statsd implementation in Ziglang.

statsd-zig

Basic DogStatsD UDP/UDS server supporting gauges and counters and sending these metrics to Datadog.

Getting started

  • libcurl must be available on the system
  • Build the binary with zig build (build with Zig 0.11.0)
  • Set the environment variables APIKEY and HOSTNAME to configure the daemon

With UDP

  • Launch the daemon and start sending it counters and gauges on port udp/8125

With UDS

  • Set the environment variable UDS to a filepath of the unix socket you want to use
  • Sends counters and gauges on this unix socket with a DogStatsD client

Memory usage

I've developed a custom memory allocator measuring how much memory is allocated while processing the metrics (see measure_allocator.zig).

Using this allocator, the memory is allocated, used, and forgotten for a while. When the total amount of allocated memory reaches a certain size, it is completely freed.

This provides two benefits:

  • close to no time spent freeing memory
  • you can easily configure the maximum amount of memory the server can use (set MAX_MEM_MB, default value 256)

Author

Rémy 'remeh' Mathieu

License

This side-project is not endorsed in any way by Datadog.

MIT

More Repositories

1

sizedwaitgroup

SizedWaitGroup has the same role and close to the same API as the Golang sync.WaitGroup but it adds a limit on the amount of goroutines started concurrently.
Go
411
star
2

diago

Diago is a visualization tool for CPU profiles and heap snapshots generated with `pprof`.
Go
358
star
3

mehstation

Opensource front-end for emulation / retro / TV box.
C
54
star
4

gost

OLD AND DEPRECATED - A realtime distributed computation system using NSQ and Etcd.
Go
18
star
5

upd

Upload from the command-line, share with your browsers.
Go
18
star
6

fatbin

Compress an executable and its resources in an auto-extractible and runnable file.
Go
17
star
7

mboximporter

MBox file importer to MongoDB
Go
8
star
8

mehcam

Motion detection for D-Link DCS-932L
Go
8
star
9

mehteor

OpenGL Game engine
C
7
star
10

mehstation-config

Configuration tool for https://github.com/remeh/mehstation.
C++
5
star
11

memoiz

Never forget a memo again.
Go
5
star
12

meh-old

meh is remeh's personal code editor
C++
5
star
13

reddit-audiences

Track audience of subreddits.
Go
4
star
14

go-webserver

Minimal, simple and powerful HTTP framework in Go. -- Old experimentation. You should use golang.org/pkg/net/http instead.
Go
4
star
15

qubuto

Quick bug-tracking tool.
JavaScript
3
star
16

mehtadata

Games metadata scraper using thegamesdb.net
Go
3
star
17

pgen

Create images with generated particles.
Go
2
star
18

smartwitter

Industrialize your Twitter usage.
Go
2
star
19

wcie

What Can I Eat - Twitter search queries analyzer in Golang
Go
2
star
20

home-sensors-server

Server receiving data from the Arduino+Olimex 4G Kit about home sensors
Go
2
star
21

goid

Basic package to generate pseudo-random unique IDs.
Go
1
star
22

galactictaxi

Galactit Taxi - Ludum Dare 23 Entry
C++
1
star
23

go-subtitles

Retrieve movies / series subtitles from a filename.
Go
1
star
24

soulkeeper

GameDevParty Jam #4 Participation - Soul Keeper team.
Lua
1
star
25

meh2d

Meh2D is a simple game library based upon Allegro 5 to easily realize 2d games in C++
C++
1
star
26

go-rrd

A golang client for talking to rrdcached
Go
1
star
27

logr

logr is a small log rotating struct compatible with io.Writer, suitable for the default log package
Go
1
star
28

memoiz-front

React Front for Memoiz. Go backend → https://github.com/remeh/memoiz
JavaScript
1
star
29

meh

remeh's personal code editor
Zig
1
star