(I couldn't find any other good contact info for this software, so I'm filing it as an issue. It would be good to add an example of this to the README. :)
What's the best way to dynamically define stats to collect? I don't know until runtime what the different possible values are. (Think different "types" that are pulled from a database at runtime.)
data = get_data()
stats = scales.collection('/data', *[scales.IntStat(n) for n in names])
for d in data:
# increment the count
setattr(stats, d, getattr(stats, d) + 1)
This is kinda ugly but it works. Is there a nicer way?
(I couldn't find any other good contact info for this software, so I'm filing it as an issue. It would be good to add an example of this to the README. :)
What's the best way to dynamically define stats to collect? I don't know until runtime what the different possible values are. (Think different "types" that are pulled from a database at runtime.)
This is kinda ugly but it works. Is there a nicer way?