Prometheus step alignment: shift interval only on jitter

* only increase interval by step if jitter happened
* shift both start and end
* simplified tests by using low epoch numbers
This commit is contained in:
David Kaltschmidt
2018-05-09 09:13:56 +02:00
parent 06aca5e8b5
commit e731c248d7
3 changed files with 139 additions and 105 deletions

View File

@@ -14,8 +14,8 @@
data-min-length=0 data-items=1000 ng-model-onblur ng-change="ctrl.refreshMetricData()">
</input>
<info-popover mode="right-absolute">
Controls the name of the time series, using name or pattern. For example <span ng-non-bindable>{{hostname}}</span> will be replaced with label value for
the label hostname.
Controls the name of the time series, using name or pattern. For example
<span ng-non-bindable>{{hostname}}</span> will be replaced with label value for the label hostname.
</info-popover>
</div>
@@ -25,7 +25,8 @@
placeholder="{{ctrl.panelCtrl.interval}}" data-min-length=0 data-items=100 ng-model-onblur ng-change="ctrl.refreshMetricData()"
/>
<info-popover mode="right-absolute">
Leave blank for auto handling based on time range and panel width
Leave blank for auto handling based on time range and panel width. Note that the actual dates used in the query will be adjusted
to a multiple of the interval step.
</info-popover>
</div>
@@ -57,4 +58,4 @@
<div class="gf-form-label gf-form-label--grow"></div>
</div>
</div>
</query-editor-row>
</query-editor-row>