You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ji...@apache.org on 2019/02/21 23:28:51 UTC
[incubator-pinot] branch master updated: [TE] frontend -
harleyjj/rootcause-anomaly - never show inconsistent data warning for 1 and
5 minute granularity (#3861)
This is an automated email from the ASF dual-hosted git repository.
jihao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 795f494 [TE] frontend - harleyjj/rootcause-anomaly - never show inconsistent data warning for 1 and 5 minute granularity (#3861)
795f494 is described below
commit 795f494eb641689c596d099cca507356a3dd2db5
Author: Harley Jackson <ha...@gmail.com>
AuthorDate: Thu Feb 21 15:28:47 2019 -0800
[TE] frontend - harleyjj/rootcause-anomaly - never show inconsistent data warning for 1 and 5 minute granularity (#3861)
never show inconsistent data warning for 1 and 5 minute granularity
---
.../pods/components/rootcause-anomaly/component.js | 43 ++++++++++++++--------
.../components/rootcause-anomaly/component-test.js | 6 +--
2 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js b/thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
index 6c87ff7..f758469 100644
--- a/thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
+++ b/thirdeye/thirdeye-frontend/app/pods/components/rootcause-anomaly/component.js
@@ -88,7 +88,6 @@ export default Component.extend({
'anomalyRange',
'anomaly',
function () {
- const anomaly = get(this, 'anomaly');
const anomalyRange = get(this, 'anomalyRange');
const start = get(this, 'anomaly').start;
const end = get(this, 'anomaly').end;
@@ -188,6 +187,12 @@ export default Component.extend({
aggregateMultiplier: reads('anomaly.attributes.aggregateMultiplier.firstObject'),
/**
+ * Anomaly granularity
+ * @type {string}
+ */
+ metricGranularity: reads('anomaly.attributes.metricGranularity.firstObject'),
+
+ /**
* Anomaly unique identifier
* @type {string}
*/
@@ -353,23 +358,29 @@ export default Component.extend({
* Checks if value at anomaly detection time and present differ by 1% or more
* @type {Boolean}
*/
- isWarning: computed('anomalyInfo', 'isRangeChanged', function () {
- if(!get(this, 'isRangeChanged')) {
- const oldCurrent = parseFloat(get(this, 'current'));
- let newCurrent = this._getAggregate('current');
- const aggregateMultiplier = parseFloat(get(this, 'aggregateMultiplier'));
- if (newCurrent && oldCurrent && aggregateMultiplier){
- newCurrent = newCurrent * aggregateMultiplier;
- const diffCurrent = Math.abs((newCurrent-oldCurrent)/newCurrent);
- if (diffCurrent > 0.01) {
- set(this, 'warningValue', true);
- } else {
- set(this, 'warningValue', false);
+ isWarning: computed('anomalyInfo', 'isRangeChanged', 'metricGranularity',
+ function () {
+ // Don't show warning when granularity is 1 or 5 minutes, regardless of discrepancy
+ const metricGranularity = get(this, 'metricGranularity');
+ if (metricGranularity === '5_MINUTES' || metricGranularity === '1_MINUTES') {
+ return false;
+ }
+ if(!get(this, 'isRangeChanged')) {
+ const oldCurrent = parseFloat(get(this, 'current'));
+ let newCurrent = this._getAggregate('current');
+ const aggregateMultiplier = parseFloat(get(this, 'aggregateMultiplier'));
+ if (newCurrent && oldCurrent && aggregateMultiplier){
+ newCurrent = newCurrent * aggregateMultiplier;
+ const diffCurrent = Math.abs((newCurrent-oldCurrent)/newCurrent);
+ if (diffCurrent > 0.01) {
+ set(this, 'warningValue', true);
+ } else {
+ set(this, 'warningValue', false);
+ }
}
}
- }
- return get(this, 'warningValue');
- }),
+ return get(this, 'warningValue');
+ }),
/**
* grabs value of new current only when warningValue is toggled
diff --git a/thirdeye/thirdeye-frontend/tests/integration/pods/components/rootcause-anomaly/component-test.js b/thirdeye/thirdeye-frontend/tests/integration/pods/components/rootcause-anomaly/component-test.js
index a898f96..e91592d 100644
--- a/thirdeye/thirdeye-frontend/tests/integration/pods/components/rootcause-anomaly/component-test.js
+++ b/thirdeye/thirdeye-frontend/tests/integration/pods/components/rootcause-anomaly/component-test.js
@@ -28,7 +28,7 @@ module('Integration | Component | rootcause-anomaly', function(hooks) {
metric : [ 'metric' ],
function : [ 'function' ],
comment : [ '' ],
- metricGranularity : [ '5_MINUTES' ],
+ metricGranularity : [ '1_DAYS' ],
dataset : [ 'my_dataset' ],
status : [ 'NO_FEEDBACK' ]
},
@@ -79,7 +79,7 @@ module('Integration | Component | rootcause-anomaly', function(hooks) {
metric : [ 'metric' ],
function : [ 'function' ],
comment : [ '' ],
- metricGranularity : [ '5_MINUTES' ],
+ metricGranularity : [ '1_DAYS' ],
dataset : [ 'my_dataset' ],
status : [ 'NO_FEEDBACK' ]
},
@@ -130,7 +130,7 @@ module('Integration | Component | rootcause-anomaly', function(hooks) {
metric : [ 'metric' ],
function : [ 'function' ],
comment : [ '' ],
- metricGranularity : [ '5_MINUTES' ],
+ metricGranularity : [ '1_DAYS' ],
dataset : [ 'my_dataset' ],
status : [ 'NO_FEEDBACK' ]
},
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org