Skip to content

Commit

Permalink
Rename the methods for one of the metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-rr committed Jan 31, 2024
1 parent 33759d2 commit 49dabbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default abstract class extends Command {
}
}

async recordActionExecuted(action: string, metadata: MetricMetadata = {}, rawDocument?: string) {
async recordActionFinished(action: string, metadata: MetricMetadata = {}, rawDocument?: string) {
if (rawDocument !== undefined) {
try {
const {document} = await this.parser.parse(rawDocument);
Expand All @@ -47,7 +47,7 @@ export default abstract class extends Command {
}

const callable = async function(recorder: Recorder) {
await recorder.recordActionExecuted(action, metadata);
await recorder.recordActionFinished(action, metadata);
};

await this.recordActionMetric(callable);
Expand Down Expand Up @@ -75,7 +75,7 @@ export default abstract class extends Command {
async finally(error: Error | undefined): Promise<any> {
await super.finally(error);
this.metricsMetadata['success'] = error === undefined;
await this.recordActionExecuted(this.id as string, this.metricsMetadata, this.specFile?.text());
await this.recordActionFinished(this.id as string, this.metricsMetadata, this.specFile?.text());
}

recorderFromEnv(prefix: string): Recorder {
Expand Down

0 comments on commit 49dabbe

Please sign in to comment.