clay
clay copied to clipboard
add an interface for bulk sending stats
This change is motivated by a similar interface that @sophiaxc and I made for an internal project. The idea for that project was that each iteration of this loop was sending a lot of statsd metrics namespaced by the project name, and so an interface where the connection had the prefix and could do bulk sending of stats was a big improvement.
Looks good! What do you think of also having a context that batches those stats?
This is a really good idea @charlax, I will send an updated PR.
Please add a unit test or two, just so we've got some level of coverage.