Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Dec 5, 2024
1 parent bc8f075 commit 57eb038
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion yarn-project/p2p/src/mem_pools/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Attributes,
type Histogram,
LmdbMetrics,
LmdbStatsCallback,
type LmdbStatsCallback,
Metrics,
type TelemetryClient,
type UpDownCounter,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/prover-client/src/proving_broker/factory.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ProverBrokerConfig } from '@aztec/circuit-types';
import { AztecLmdbStore } from '@aztec/kv-store/lmdb';
import { TelemetryClient } from '@aztec/telemetry-client';
import { type TelemetryClient } from '@aztec/telemetry-client';

import { ProvingBroker } from './proving_broker.js';
import { InMemoryBrokerDatabase } from './proving_broker_database/memory.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { createDebugLogger } from '@aztec/foundation/log';
import { RunningPromise } from '@aztec/foundation/running-promise';
import { Timer } from '@aztec/foundation/timer';
import { TelemetryClient } from '@aztec/telemetry-client';
import { type TelemetryClient } from '@aztec/telemetry-client';

import { type ProofStore } from './proof_store.js';
import { ProvingAgentInstrumentation } from './proving_agent_instrumentation.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ProvingRequestType } from '@aztec/circuit-types';
import { Timer } from '@aztec/foundation/timer';
import { Attributes, Histogram, Metrics, TelemetryClient, UpDownCounter, ValueType } from '@aztec/telemetry-client';
import { type Histogram, Metrics, type TelemetryClient, ValueType } from '@aztec/telemetry-client';

export class ProvingAgentInstrumentation {
private idleTime: Histogram;
Expand All @@ -9,7 +8,7 @@ export class ProvingAgentInstrumentation {
const meter = client.getMeter(name);

this.idleTime = meter.createHistogram(Metrics.PROVING_AGENT_IDLE, {
description: 'Records how long an agent was in between jobs',
description: 'Records how long an agent was idle',
unit: 'ms',
valueType: ValueType.INT,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import { createDebugLogger } from '@aztec/foundation/log';
import { type PromiseWithResolvers, RunningPromise, promiseWithResolvers } from '@aztec/foundation/promise';
import { PriorityMemoryQueue } from '@aztec/foundation/queue';
import { Timer } from '@aztec/foundation/timer';
import { TelemetryClient } from '@aztec/telemetry-client';
import { type TelemetryClient } from '@aztec/telemetry-client';

import assert from 'assert';

import { type ProvingBrokerDatabase } from './proving_broker_database.js';
import { MonitorCallback, ProvingBrokerInstrumentation } from './proving_broker_instrumentation.js';
import { type MonitorCallback, ProvingBrokerInstrumentation } from './proving_broker_instrumentation.js';

type InProgressMetadata = {
id: ProvingJobId;
Expand Down Expand Up @@ -111,7 +111,7 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer {
return count;
};

public async start(): Promise<void> {
public start(): Promise<void> {
for (const [item, result] of this.database.allProvingJobs()) {
this.logger.info(`Restoring proving job id=${item.id} settled=${!!result}`);

Expand All @@ -131,6 +131,8 @@ export class ProvingBroker implements ProvingJobProducer, ProvingJobConsumer {

this.instrumentation.monitorQueueDepth(this.measureQueueDepth);
this.instrumentation.monitorActiveJobs(this.countActiveJobs);

return Promise.resolve();
}

public stop(): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type ProofUri, ProvingJob, type ProvingJobId, ProvingJobSettledResult } from '@aztec/circuit-types';
import { jsonParseWithSchema, jsonStringify } from '@aztec/foundation/json-rpc';
import { type AztecKVStore, type AztecMap } from '@aztec/kv-store';
import { LmdbMetrics, Metrics, TelemetryClient } from '@aztec/telemetry-client';
import { LmdbMetrics, Metrics, type TelemetryClient } from '@aztec/telemetry-client';

import { type ProvingBrokerDatabase } from '../proving_broker_database.js';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/telemetry-client/src/lmdb_metrics.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BatchObservableResult, type Meter, type Metrics, ObservableGauge, ValueType } from './telemetry.js';
import { type BatchObservableResult, type Meter, type Metrics, ObservableGauge, ValueType } from './telemetry.js';

export type LmdbMetricDescriptor = {
name: Metrics;
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/telemetry-client/src/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
type AttributeValue,
BatchObservableCallback,
type BatchObservableCallback,
type MetricOptions,
Observable,
type Observable,
type BatchObservableResult as OtelBatchObservableResult,
type Gauge as OtelGauge,
type Histogram as OtelHistogram,
Expand Down

0 comments on commit 57eb038

Please sign in to comment.