Skip to content

Commit 1ac8cc0

Browse files
committed
perf tracking transpileJsFilesBulk
1 parent bd79727 commit 1ac8cc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ export class DataSchemaCompiler {
592592
errorsReport: ErrorReporter,
593593
{ cubeNames, cubeSymbols, contextSymbols, transpilerNames, compilerId, stage }: TranspileOptions
594594
): Promise<(FileContent | undefined)[]> {
595+
const compileJsFileTimer = perfTracker.start('transpileJsFilesBulk (native)');
596+
595597
// for bulk processing this data may be optimized even more by passing transpilerNames, compilerId only once for a bulk
596598
// but this requires more complex logic to be implemented in the native side.
597599
// And comparing to the file content sizes, a few bytes of JSON data is not a big deal here
@@ -611,6 +613,8 @@ export class DataSchemaCompiler {
611613
}));
612614
const res = await transpileJs(reqDataArr);
613615

616+
compileJsFileTimer.end();
617+
614618
return files.map((file, index) => {
615619
errorsReport.inFile(file);
616620
if (!res[index]) { // This should not happen in theory but just to be safe

0 commit comments

Comments
 (0)