Skip to content

Commit c21726f

Browse files
authored
Add sizeCategory attribute to lint.workspaceFile.duration metric (#523)
1 parent 819e02d commit c21726f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/services/cfnLint/CfnLintService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ export class CfnLintService implements SettingsConfigurable, Closeable, Readines
417417
content: string,
418418
): Promise<void> {
419419
const startTime = performance.now();
420+
const doc = this.documentManager.get(uri);
421+
const sizeCategory = doc?.getTemplateSizeCategory() ?? 'unknown';
420422
try {
421423
// Ensure folder is mounted before linting
422424
try {
@@ -487,6 +489,7 @@ export class CfnLintService implements SettingsConfigurable, Closeable, Readines
487489
(performance.now() - startTime) / byteSize(content),
488490
{
489491
unit: 'ms/byte',
492+
attributes: { sizeCategory },
490493
},
491494
);
492495
}

0 commit comments

Comments
 (0)