Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
update based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
boyang9527 committed Sep 10, 2018
1 parent 9bf08a8 commit 8eb6e90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/autoscaler/collection/TSDCache.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c *TSDCache) binarySearch(t int64) int {
if l > r {
return l
}
m := (l + r) / 2
m := l + (r-l)/2
if t <= c.data[m%c.capacity].GetTimestamp() {
r = m - 1
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/autoscaler/metricscollector/server/metric_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (h *MetricHandler) GetMetricHistories(w http.ResponseWriter, r *http.Reques
if instanceIndex >= 0 {
labels[models.MetricLabelInstanceIndex] = fmt.Sprintf("%d", instanceIndex)
}
mtrcs, ok := h.queryFunc(appId, start, end, order, labels)
mtrcs, ok := h.queryFunc(appId, start, end+1, order, labels)
if !ok {
h.logger.Debug("get-metric-histories-query-cache-miss", lager.Data{"appId": appId, "metrictype": metricType, "instanceIndex": instanceIndex, "start": start, "end": end, "order": order})
mtrcs, err = h.database.RetrieveInstanceMetrics(appId, int(instanceIndex), metricType, start, end, order)
Expand Down

0 comments on commit 8eb6e90

Please sign in to comment.