unbit/uwsgi — pull request #486 by prymitive (2013-12-22 18:20:20+00:00)
Title: metric->value should be allocated when registering metric

so we can register additional metrics inside any plugin without having to initialize it manually.

I was trying to add metrics support to cheaper busyness, but after registering metric inside the plugin uWSGI just kept crashing, after spending some time digging through the code I've found that metric->value pointer was allocated only for core metrics during startup, so I would have to allocate metric->value after registering my metric inside the plugin. IMHO it makes much more sense to handle that inside register function, this patch does that. Please review