Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
TangoArchivingGraphQLExtractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango controls archiving
TangoArchivingGraphQLExtractor
Commits
030b87d6
Commit
030b87d6
authored
3 weeks ago
by
gwen-soleil
Browse files
Options
Downloads
Patches
Plain Diff
add debug log
parent
abfe2f39
Branches
main
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/soleil/archiving/datafetch/graphql/datasource/infra/TimeseriesDatabase.java
+5
-3
5 additions, 3 deletions
...atafetch/graphql/datasource/infra/TimeseriesDatabase.java
with
5 additions
and
3 deletions
src/main/java/fr/soleil/archiving/datafetch/graphql/datasource/infra/TimeseriesDatabase.java
+
5
−
3
View file @
030b87d6
...
...
@@ -164,10 +164,12 @@ public class TimeseriesDatabase implements IDatabase {
public
AttributeValues
getValues
(
String
attributeCompleteName
,
String
startDateForApi
,
String
endDateForApi
,
SamplingType
sampling
,
short
samplingValue
)
{
AttributeValues
result
;
final
Optional
<
AttributeConfig
>
attributeConfig
=
configService
.
getAttributeConfig
(
attributeCompleteName
);
if
(
attributeConfig
.
isPresent
())
{
LOGGER
.
debug
(
"fetching {}"
,
attributeConfig
.
get
());
if
(
sampling
.
equals
(
SamplingType
.
ALL
))
{
final
AttributeValueSeries
data
=
fetcherService
.
getBetween
(
attributeCompleteName
,
getTimestamp
(
startDateForApi
),
getTimestamp
(
endDateForApi
),
false
);
LOGGER
.
debug
(
"fetch
ing
{} values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
LOGGER
.
debug
(
"fetch
ed
{} values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
result
=
AttributeValueMapper
.
mapAttributeValues
(
attributeCompleteName
,
data
,
configService
.
getAttributeConfig
(
attributeCompleteName
).
get
());
}
else
{
String
samplingString
=
"1 hour"
;
...
...
@@ -189,10 +191,10 @@ public class TimeseriesDatabase implements IDatabase {
AttributeValueSeries
data
;
if
(
attributeConfig
.
get
().
getType
()
==
TangoConst
.
Tango_DEV_BOOLEAN
)
{
data
=
fetcherService
.
getWithSampling
(
attributeCompleteName
,
samplingString
,
"bool_or"
,
getTimestamp
(
startDateForApi
),
getTimestamp
(
endDateForApi
));
LOGGER
.
debug
(
"fetch
ing
{} sampled boolean with bool_or values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
LOGGER
.
debug
(
"fetch
ed
{} sampled boolean with bool_or values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
}
else
{
data
=
fetcherService
.
getWithSampling
(
attributeCompleteName
,
samplingString
,
"min"
,
getTimestamp
(
startDateForApi
),
getTimestamp
(
endDateForApi
));
LOGGER
.
debug
(
"fetch
ing
{} sampled values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
LOGGER
.
debug
(
"fetch
ed
{} sampled values for {}"
,
data
.
getAttributeValues
().
size
(),
attributeCompleteName
);
}
result
=
AttributeValueMapper
.
mapAttributeValues
(
attributeCompleteName
,
data
,
configService
.
getAttributeConfig
(
attributeCompleteName
).
get
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment