mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Get timeseries data with timestamps
This commit is contained in:
parent
da07b294bd
commit
fb3a0b8659
6 changed files with 57 additions and 10 deletions
|
|
@ -194,6 +194,20 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function ts_common.serieWithTimestamp(serie, tstart, tstep)
|
||||
local data = {}
|
||||
local t = tstart
|
||||
|
||||
for i, pt in ipairs(serie) do
|
||||
data[t] = pt
|
||||
t = t + tstep
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local last_error = nil
|
||||
local last_error_msg = nil
|
||||
ts_common.ERR_OPERATION_TOO_SLOW = "OPERATION_TOO_SLOW"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue