Methods
(static) computeBucketSizeInSec(input) → {number}
- Description:
- returns bucket size in seconds
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
let bucketSizeInSec = mdx.Utils.Histogram.computeBucketSizeInSec({fromTimestamp: "2023-01-12T11:20:10.000Z", toTimestamp: "2023-01-12T14:20:10.000Z"});
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
input |
Object | Input object.
Properties
|
Returns:
- Bucket size in seconds (an integer) is returned
- Type
- number
(static) getDefaultHistogramBucketCount() → {number}
- Description:
- returns default histogram bucket count
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
let defaultHistogramBucketCount = mdx.Utils.Histogram.getDefaultHistogramBucketCount();
Returns:
- Default histogram bucket count (an integer) is returned
- Type
- number
(static) getEmptyHistogram(input) → {Array.<start:string, end:string>}
- Description:
- returns an empty histogram
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
let emptyHistogram = mdx.Utils.Histogram.getEmptyHistogram({ bucketSizeInSec:600, fromTimestamp: "2023-01-12T11:20:10.000Z", toTimestamp: "2023-01-12T14:20:10.000Z"});
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
input |
Object | Input object.
Properties
|
Returns:
- An empty histogram with start and end timestamps are returned
- Type
- Array.<start:string, end:string>
(static) getMaxHistogramBucketCount() → {number}
- Description:
- returns max histogram bucket count
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
let maxHistogramBucketCount = mdx.Utils.Histogram.getMaxHistogramBucketCount();
Returns:
- Max histogram bucket count (an integer) is returned
- Type
- number