Software / code / prosody
Comparison
util/statsd.lua @ 7988:dc758422d896
util.statistics,statsd,throttle,timer: Replace dependency on LuaSockect with util.time for precision time
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 20 Mar 2017 00:48:28 +0100 |
| parent | 7701:672a863105f6 |
| child | 10924:0c072dd69603 |
comparison
equal
deleted
inserted
replaced
| 7987:b3ee697158b5 | 7988:dc758422d896 |
|---|---|
| 1 local socket = require "socket"; | 1 local socket = require "socket"; |
| 2 | 2 |
| 3 local time = require "socket".gettime; | 3 local time = require "util.time".now |
| 4 | 4 |
| 5 local function new(config) | 5 local function new(config) |
| 6 if not config or not config.statsd_server then | 6 if not config or not config.statsd_server then |
| 7 return nil, "No statsd server specified in the config, please see https://prosody.im/doc/statistics"; | 7 return nil, "No statsd server specified in the config, please see https://prosody.im/doc/statistics"; |
| 8 end | 8 end |