Skip to content

Commit

Permalink
delete interval and percentile changes as they were addressed in othe…
Browse files Browse the repository at this point in the history
…r PRs
  • Loading branch information
MGJamJam committed Jul 25, 2024
1 parent 53c5c3a commit f95514e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/types/grafanaTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const DEFAULT_QUERY: Partial<BitmovinAnalyticsDataQuery> = {
filter: [],
resultFormat: 'time_series',
interval: 'AUTO',
percentileValue: 95,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/intervalUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('calculateQueryInterval', () => {
it('should return HOUR interval if interval is AUTO and time interval bigger 3 hours and than below 6 hours', () => {
//arrange
const startTimestamp = 1713345420000; //Wednesday, 17 April 2024 09:17:00
const endTimestamp = 1713356340000; //Wednesday, 17 April 2024 12:19:00
const endTimestamp = 1713356280000; //Wednesday, 17 April 2024 12:18:00

// act
const result = calculateQueryInterval('AUTO', startTimestamp, endTimestamp);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/intervalUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const calculateQueryInterval = (
}

const intervalInMilliseconds = endTimestamp - startTimestamp;
const minuteIntervalLimitInMilliseconds = 3 * 60 * 60 * 1000 + 60000; // MINUTE granularity for timeframes below 3h 1m
const minuteIntervalLimitInMilliseconds = 3 * 60 * 60 * 1000; // MINUTE granularity for timeframes below 3h
const hourIntervalLimitInMilliseconds = 6 * 24 * 60 * 60 * 1000; // HOUR granularity for timeframes below 6d
const dayIntervalLimitInMilliseconds = 30 * 24 * 60 * 60 * 1000; // DAY granularity for timeframes below 30d

Expand Down

0 comments on commit f95514e

Please sign in to comment.