FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
netdata/src/database/rrd-algorithm.c at master · ackcell/netdata · GitHub
ackcell
/
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
/
src
/
database
/
rrd-algorithm.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (27 loc) · 1.11 KB
Breadcrumbs
netdata
/
src
/
database
/
rrd-algorithm.c
Copy path
File metadata and controls
37 lines (27 loc) · 1.11 KB
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
// SPDX-License-Identifier: GPL-3.0-or-later
#include
"rrd-algorithm.h"
RRD_ALGORITHM
rrd_algorithm_id
(
const
char
*
name
) {
if
(
strcmp
(
name
,
RRD_ALGORITHM_INCREMENTAL_NAME
)
==
0
)
return
RRD_ALGORITHM_INCREMENTAL
;
else
if
(
strcmp
(
name
,
RRD_ALGORITHM_ABSOLUTE_NAME
)
==
0
)
return
RRD_ALGORITHM_ABSOLUTE
;
else
if
(
strcmp
(
name
,
RRD_ALGORITHM_PCENT_OVER_ROW_TOTAL_NAME
)
==
0
)
return
RRD_ALGORITHM_PCENT_OVER_ROW_TOTAL
;
else
if
(
strcmp
(
name
,
RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL_NAME
)
==
0
)
return
RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL
;
else
return
RRD_ALGORITHM_ABSOLUTE
;
}
const
char
*
rrd_algorithm_name
(
RRD_ALGORITHM
algorithm
) {
switch
(
algorithm
) {
case
RRD_ALGORITHM_ABSOLUTE
:
default
:
return
RRD_ALGORITHM_ABSOLUTE_NAME
;
case
RRD_ALGORITHM_INCREMENTAL
:
return
RRD_ALGORITHM_INCREMENTAL_NAME
;
case
RRD_ALGORITHM_PCENT_OVER_ROW_TOTAL
:
return
RRD_ALGORITHM_PCENT_OVER_ROW_TOTAL_NAME
;
case
RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL
:
return
RRD_ALGORITHM_PCENT_OVER_DIFF_TOTAL_NAME
;
}
}
Back
|
FazBrowse Home
|
New Git URL