Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
444b728d
Commit
444b728d
authored
Jan 08, 2021
by
Alessio Netti
Browse files
Analytics: fixes to PersystSQL operator
parent
88f9340d
Changes
3
Hide whitespace changes
Inline
Side-by-side
analytics/operators/persystsql/PerSystSqlConfigurator.cpp
View file @
444b728d
...
...
@@ -86,7 +86,7 @@ void PerSystSqlConfigurator::operatorAttributes(PerSystSqlOperator& op, CFG_VAL
}
}
else
if
(
boost
::
iequals
(
val
.
first
,
"go_back_ms"
))
{
try
{
auto
go_back_ms
=
std
::
sto
i
(
val
.
second
.
data
());
uint64_t
go_back_ms
=
std
::
sto
ull
(
val
.
second
.
data
());
op
.
setGoBackInMs
(
go_back_ms
);
}
catch
(
const
std
::
exception
&
e
)
{
LOG
(
error
)
<<
" Error parsing go_back_ms
\"
"
<<
val
.
second
.
data
()
<<
"
\"
: "
<<
e
.
what
();
...
...
analytics/operators/persystsql/PerSystSqlOperator.cpp
View file @
444b728d
...
...
@@ -100,7 +100,7 @@ void PerSystSqlOperator::printConfig(LOG_LEVEL ll) {
LOG_VAR
(
ll
)
<<
"PerSystSQL Operator "
<<
_name
;
LOG_VAR
(
ll
)
<<
"===================================="
;
LOG_VAR
(
ll
)
<<
"backend="
<<
_backend
;
LOG_VAR
(
ll
)
<<
"go_back_ms="
<<
_go_back_ns
/
1
e6
;
LOG_VAR
(
ll
)
<<
"go_back_ms="
<<
_go_back_ns
/
1
000000
;
LOG_VAR
(
ll
)
<<
"scaling_factor="
<<
_scaling_factor
;
LOG_VAR
(
ll
)
<<
"batch_domain="
<<
_batch_domain
;
if
(
_backend
==
MARIADB
){
...
...
@@ -145,7 +145,7 @@ void PerSystSqlOperator::compute(U_Ptr unit, qeJobData& jobData) {
// Clearing the buffer, if already allocated
_buffer
.
clear
();
size_t
elCtr
=
0
;
uint64_t
tolerance_ms
=
(
uint64_t
)
_interval
*
2
/
3
;
uint64_t
tolerance_ms
=
(
uint64_t
)
_interval
;
uint64_t
my_timestamp
=
getTimestamp
()
-
_go_back_ns
;
// Too early to fetch data for the job
...
...
analytics/operators/persystsql/PerSystSqlOperator.h
View file @
444b728d
...
...
@@ -97,8 +97,8 @@ public:
_severity_threshold
=
severityThreshold
;
}
void
setGoBackInMs
(
int
go_back_ms
){
_go_back_ns
=
go_back_ms
*
1
e6
;
void
setGoBackInMs
(
u
int
64_t
go_back_ms
){
_go_back_ns
=
go_back_ms
*
1
000000
;
}
void
setBackend
(
Backend_t
backend
)
{
...
...
@@ -147,7 +147,7 @@ private:
double
_severity_exponent
;
double
_severity_max_memory
;
std
::
vector
<
double
>
_severities
;
int
_go_back_ns
;
u
int
64_t
_go_back_ns
;
Backend_t
_backend
;
double
_scaling_factor
;
bool
_searchedOnceForMetaData
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment