FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
netdata/ml/Query.h at master · sourcecodes2/netdata · GitHub
sourcecodes2
/
netdata
Public
forked from
netdata/netdata
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
netdata
/
ml
/
Query.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (36 loc) · 878 Bytes
Breadcrumbs
netdata
/
ml
/
Query.h
Copy path
File metadata and controls
49 lines (36 loc) · 878 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
ifndef
QUERY_H
#
define
QUERY_H
#
include
"
ml-private.h
"
namespace
ml
{
class
Query
{
public:
Query
(
RRDDIM
*
RD
) :
RD
(
RD
) {
Ops = &
RD
->
state
->
query_ops
;
}
time_t
latestTime
() {
return
Ops->
latest_time
(
RD
);
}
time_t
oldestTime
() {
return
Ops->
oldest_time
(
RD
);
}
void
init
(
time_t
AfterT,
time_t
BeforeT) {
Ops->
init
(
RD
, &Handle, AfterT, BeforeT);
}
bool
isFinished
() {
return
Ops->
is_finished
(&Handle);
}
std::pair<
time_t
, storage_number>
nextMetric
() {
time_t
CurrT;
storage_number
SN
= Ops->
next_metric
(&Handle, &CurrT);
return
{ CurrT,
SN
};
}
~Query
() {
Ops->
finalize
(&Handle);
}
private:
RRDDIM
*
RD
;
struct
rrddim_volatile
::rrddim_query_ops *Ops;
struct
rrddim_query_handle
Handle;
};
}
//
namespace ml
#
endif
/*
QUERY_H
*/
Back
|
FazBrowse Home
|
New Git URL