New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bull-monitor/root

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bull-monitor/root - npm Package Compare versions

Comparing version 2.14.1 to 2.15.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.15.0](https://github.com/s-r-x/bull-monitor/compare/v2.14.1...v2.15.0) (2021-12-06)
### Features
* min/max processing time metrics ([a22c234](https://github.com/s-r-x/bull-monitor/commit/a22c234709d175963ba0f545f6364ed12ce0743b))
## [2.14.1](https://github.com/s-r-x/bull-monitor/compare/v2.14.0...v2.14.1) (2021-11-29)

@@ -8,0 +19,0 @@

2

dist/gql/data-sources/metrics/index.d.ts

@@ -12,2 +12,4 @@ /// <reference types="bull" />

processingTime?: number | undefined;
processingTimeMin?: number | undefined;
processingTimeMax?: number | undefined;
}[]>;

@@ -14,0 +16,0 @@ clearAllMetrics(): Promise<boolean>;

@@ -10,4 +10,6 @@ "use strict";

processingTime: Float
processingTimeMin: Float
processingTimeMax: Float
}
`;
//# sourceMappingURL=metrics.js.map

@@ -9,2 +9,4 @@ import type { JobCounts } from 'bull';

processingTime?: number;
processingTimeMin?: number;
processingTimeMax?: number;
};

@@ -34,2 +36,3 @@ export declare class MetricsCollector {

private _extractProcessingTime;
private _normalizeProcessingTime;
private _buildPersistKey;

@@ -36,0 +39,0 @@ private get _redisClient();

23

dist/metrics-collector.js

@@ -91,8 +91,3 @@ "use strict";

this._processingTimeGauge.set(queue.id, []);
return {
timestamp,
queue: queue.id,
counts: yield queue.getJobCounts(),
processingTime,
};
return Object.assign({ timestamp, queue: queue.id, counts: yield queue.getJobCounts() }, processingTime);
})));

@@ -151,9 +146,13 @@ });

const stats = this._processingTimeGauge.get(queue);
if (isEmpty_1.default(stats)) {
return;
}
else {
return round_1.default(sum_1.default(stats) / stats.length, 2);
}
if (isEmpty_1.default(stats))
return {};
return {
processingTime: this._normalizeProcessingTime(sum_1.default(stats) / stats.length),
processingTimeMin: this._normalizeProcessingTime(Math.min(...stats)),
processingTimeMax: this._normalizeProcessingTime(Math.max(...stats)),
};
}
_normalizeProcessingTime(time) {
return round_1.default(time, 2);
}
_buildPersistKey(queue) {

@@ -160,0 +159,0 @@ return this._config.redisPrefix + queue;

@@ -253,2 +253,4 @@ export declare type Maybe<T> = T | null;

processingTime?: Maybe<Scalars['Float']>;
processingTimeMin?: Maybe<Scalars['Float']>;
processingTimeMax?: Maybe<Scalars['Float']>;
};

@@ -255,0 +257,0 @@ export declare type RedisInfo = {

{
"name": "@bull-monitor/root",
"version": "2.14.1",
"version": "2.15.0",
"repository": {

@@ -42,3 +42,3 @@ "type": "git",

},
"gitHead": "b4304e25f8bb4b3996f7ba325c64e573cdf08775"
"gitHead": "d3fa5b6bc945b3214ae49e0d886df847b450ef26"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc