Histogram

mdxWebApiCore.Utils. Histogram

Class which defines Histogram

Constructor

new Histogram()

Source:

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
Name Type Attributes Default Description
bucketCount number <optional>
20 bucketCount must be an integer.
fromTimestamp string
toTimestamp string
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
Name Type Description
bucketSizeInSec number bucketSizeInSec must be an integer.
fromTimestamp string
toTimestamp string
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