Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
SigNoz
Commits
41a04788
Commit
41a04788
authored
2 years ago
by
Srikanth Chekuri
Browse files
Options
Download
Email Patches
Plain Diff
chore: fix the dip at the end for incomplete time range
parent
d408ed39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/query-service/app/http_handler.go
+7
-0
pkg/query-service/app/http_handler.go
pkg/query-service/app/metrics/query_builder.go
+1
-1
pkg/query-service/app/metrics/query_builder.go
with
8 additions
and
1 deletion
+8
-1
pkg/query-service/app/http_handler.go
+
7
-
0
View file @
41a04788
...
...
@@ -457,6 +457,13 @@ func (aH *APIHandler) queryRangeMetricsV2(w http.ResponseWriter, r *http.Request
metricsQueryRangeParams
.
Start
=
metricsQueryRangeParams
.
End
}
// round up the end to neaerest multiple
if
metricsQueryRangeParams
.
CompositeMetricQuery
.
QueryType
==
model
.
QUERY_BUILDER
{
end
:=
(
metricsQueryRangeParams
.
End
)
/
1000
step
:=
metricsQueryRangeParams
.
Step
metricsQueryRangeParams
.
End
=
(((
end
+
step
-
1
)
/
step
)
*
step
)
*
1000
}
type
channelResult
struct
{
Series
[]
*
model
.
Series
Err
error
...
...
This diff is collapsed.
Click to expand it.
pkg/query-service/app/metrics/query_builder.go
+
1
-
1
View file @
41a04788
...
...
@@ -151,7 +151,7 @@ func BuildMetricQuery(qp *model.QueryRangeParamsV2, mq *model.MetricQuery, table
return
""
,
err
}
samplesTableTimeFilter
:=
fmt
.
Sprintf
(
"metric_name = %s AND timestamp_ms >= %d AND timestamp_ms < %d"
,
formattedValue
(
mq
.
MetricName
),
qp
.
Start
,
qp
.
End
)
samplesTableTimeFilter
:=
fmt
.
Sprintf
(
"metric_name = %s AND timestamp_ms >= %d AND timestamp_ms <
=
%d"
,
formattedValue
(
mq
.
MetricName
),
qp
.
Start
,
qp
.
End
)
// Select the aggregate value for interval
queryTmpl
:=
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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