Mercurial > prosody-hg
comparison core/statsmanager.lua @ 6577:1e749832ed3b
statsmanager: Perform an initial collection right after startup is completed
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 22 Feb 2015 18:44:48 +0100 |
| parents | 7b2d16c14659 |
| children | 71b5de1d830b |
comparison
equal
deleted
inserted
replaced
| 6576:b7796a46aec2 | 6577:1e749832ed3b |
|---|---|
| 46 mark_processing_done(); | 46 mark_processing_done(); |
| 47 return stats_interval; | 47 return stats_interval; |
| 48 end | 48 end |
| 49 | 49 |
| 50 timer.add_task(stats_interval, collect); | 50 timer.add_task(stats_interval, collect); |
| 51 prosody.events.add_handler("server-started", function () collect() end, -1); | |
| 51 else | 52 else |
| 52 log("debug", "Statistics collection is disabled"); | 53 log("debug", "Statistics collection is disabled"); |
| 53 -- nop | 54 -- nop |
| 54 function measure() | 55 function measure() |
| 55 return measure; | 56 return measure; |
