storage process metrics
This commit is contained in:
parent
b3ac15ff63
commit
5a5306ce74
1 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import { allMetricsMigrations, allMigrations } from '../migrations/runner.js';
|
||||||
import transactionsQueue from './transactionsQueue.js';
|
import transactionsQueue from './transactionsQueue.js';
|
||||||
import { PickKeysByType } from 'typeorm/common/PickKeysByType';
|
import { PickKeysByType } from 'typeorm/common/PickKeysByType';
|
||||||
import { deserializeRequest, WhereCondition } from './serializationHelpers.js';
|
import { deserializeRequest, WhereCondition } from './serializationHelpers.js';
|
||||||
|
import { ProcessMetricsCollector } from '../tlv/processMetricsCollector.js';
|
||||||
|
|
||||||
export type DBNames = MainDbNames | MetricsDbNames
|
export type DBNames = MainDbNames | MetricsDbNames
|
||||||
export type QueryOptions<T> = {
|
export type QueryOptions<T> = {
|
||||||
|
|
@ -164,6 +165,15 @@ class StorageProcessor {
|
||||||
process.on('error', (error: Error) => {
|
process.on('error', (error: Error) => {
|
||||||
console.error('Error in storage processor:', error);
|
console.error('Error in storage processor:', error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
new ProcessMetricsCollector((pMetrics) => {
|
||||||
|
this.sendResponse({
|
||||||
|
success: true,
|
||||||
|
type: 'processMetrics',
|
||||||
|
data: pMetrics,
|
||||||
|
opId: Math.random().toString()
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleOperation(operation: StorageOperation<any>) {
|
private async handleOperation(operation: StorageOperation<any>) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue