@datadog/sketches-js
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -92,2 +92,25 @@ import { DenseStore } from './store'; | ||
} | ||
interface LogCollapsingSketchConfig { | ||
/** The accuracy guarantee of the sketch, between 0-1 (default 0.01) */ | ||
relativeAccuracy?: number; | ||
binLimit?: number; | ||
} | ||
export declare class LogCollapsingLowestDenseDDSketch extends BaseDDSketch { | ||
/** | ||
* Initialize a new LogCollapsingLowestDenseDDSketch | ||
* | ||
* @param relativeAccuracy The accuracy guarantee of the sketch (default 0.01) | ||
* @param binLimit Number of bins before lowest indices are collapsed (default 2048) | ||
*/ | ||
constructor({ relativeAccuracy, binLimit }?: LogCollapsingSketchConfig); | ||
} | ||
export declare class LogCollapsingHighestDenseDDSketch extends BaseDDSketch { | ||
/** | ||
* Initialize a new LogCollapsingHighestDenseDDSketch | ||
* | ||
* @param relativeAccuracy The accuracy guarantee of the sketch (default 0.01) | ||
* @param binLimit Number of bins before highest indices are collapsed (default 2048) | ||
*/ | ||
constructor({ relativeAccuracy, binLimit }?: LogCollapsingSketchConfig); | ||
} | ||
export {}; |
@@ -24,6 +24,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DDSketch = void 0; | ||
exports.LogCollapsingHighestDenseDDSketch = exports.LogCollapsingLowestDenseDDSketch = exports.DDSketch = void 0; | ||
var store_1 = require("./store"); | ||
var mapping_1 = require("./mapping"); | ||
var DEFAULT_RELATIVE_ACCURACY = 0.01; | ||
var DEFAULT_BIN_LIMIT = 2048; | ||
/** Base class for DDSketch*/ | ||
@@ -205,1 +206,37 @@ var BaseDDSketch = /** @class */ (function () { | ||
exports.DDSketch = DDSketch; | ||
var LogCollapsingLowestDenseDDSketch = /** @class */ (function (_super) { | ||
__extends(LogCollapsingLowestDenseDDSketch, _super); | ||
/** | ||
* Initialize a new LogCollapsingLowestDenseDDSketch | ||
* | ||
* @param relativeAccuracy The accuracy guarantee of the sketch (default 0.01) | ||
* @param binLimit Number of bins before lowest indices are collapsed (default 2048) | ||
*/ | ||
function LogCollapsingLowestDenseDDSketch(_a) { | ||
var _b = _a === void 0 ? defaultConfig : _a, _c = _b.relativeAccuracy, relativeAccuracy = _c === void 0 ? DEFAULT_RELATIVE_ACCURACY : _c, _d = _b.binLimit, binLimit = _d === void 0 ? DEFAULT_BIN_LIMIT : _d; | ||
var mapping = new mapping_1.LogarithmicMapping(relativeAccuracy); | ||
var store = new store_1.CollapsingLowestDenseStore(binLimit); | ||
var negativeStore = new store_1.CollapsingLowestDenseStore(binLimit); | ||
return _super.call(this, { mapping: mapping, store: store, negativeStore: negativeStore, zeroCount: 0 }) || this; | ||
} | ||
return LogCollapsingLowestDenseDDSketch; | ||
}(BaseDDSketch)); | ||
exports.LogCollapsingLowestDenseDDSketch = LogCollapsingLowestDenseDDSketch; | ||
var LogCollapsingHighestDenseDDSketch = /** @class */ (function (_super) { | ||
__extends(LogCollapsingHighestDenseDDSketch, _super); | ||
/** | ||
* Initialize a new LogCollapsingHighestDenseDDSketch | ||
* | ||
* @param relativeAccuracy The accuracy guarantee of the sketch (default 0.01) | ||
* @param binLimit Number of bins before highest indices are collapsed (default 2048) | ||
*/ | ||
function LogCollapsingHighestDenseDDSketch(_a) { | ||
var _b = _a === void 0 ? defaultConfig : _a, _c = _b.relativeAccuracy, relativeAccuracy = _c === void 0 ? DEFAULT_RELATIVE_ACCURACY : _c, _d = _b.binLimit, binLimit = _d === void 0 ? DEFAULT_BIN_LIMIT : _d; | ||
var mapping = new mapping_1.LogarithmicMapping(relativeAccuracy); | ||
var store = new store_1.CollapsingHighestDenseStore(binLimit); | ||
var negativeStore = new store_1.CollapsingHighestDenseStore(binLimit); | ||
return _super.call(this, { mapping: mapping, store: store, negativeStore: negativeStore, zeroCount: 0 }) || this; | ||
} | ||
return LogCollapsingHighestDenseDDSketch; | ||
}(BaseDDSketch)); | ||
exports.LogCollapsingHighestDenseDDSketch = LogCollapsingHighestDenseDDSketch; |
@@ -1,1 +0,1 @@ | ||
export { DDSketch } from './DDSketch'; | ||
export * from './DDSketch'; |
@@ -8,5 +8,17 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DDSketch = void 0; | ||
var DDSketch_1 = require("./DDSketch"); | ||
Object.defineProperty(exports, "DDSketch", { enumerable: true, get: function () { return DDSketch_1.DDSketch; } }); | ||
__exportStar(require("./DDSketch"), exports); |
@@ -1,1 +0,1 @@ | ||
export { DDSketch } from './ddsketch'; | ||
export * from './ddsketch'; |
@@ -8,5 +8,17 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DDSketch = void 0; | ||
var ddsketch_1 = require("./ddsketch"); | ||
Object.defineProperty(exports, "DDSketch", { enumerable: true, get: function () { return ddsketch_1.DDSketch; } }); | ||
__exportStar(require("./ddsketch"), exports); |
{ | ||
"name": "@datadog/sketches-js", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "TypeScript implementation of DDSketch, a distributed quantile sketch algorithm ", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109899
2448