Skip to content

Commit 79a754d

Browse files
committed
perf tracking transpileJsFilesBulk
1 parent 9d16240 commit 79a754d

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
@@ -515,6 +515,8 @@ export class DataSchemaCompiler {
515515
errorsReport: ErrorReporter,
516516
{ cubeNames, cubeSymbols, contextSymbols, transpilerNames, compilerId, stage }: TranspileOptions
517517
): Promise<(FileContent | undefined)[]> {
518+
const compileJsFileTimer = perfTracker.start('transpileJsFilesBulk (native)');
519+
518520
// for bulk processing this data may be optimized even more by passing transpilerNames, compilerId only once for a bulk
519521
// but this requires more complex logic to be implemented in the native side.
520522
// And comparing to the file content sizes, a few bytes of JSON data is not a big deal here
@@ -534,6 +536,8 @@ export class DataSchemaCompiler {
534536
}));
535537
const res = await transpileJs(reqDataArr);
536538

539+
compileJsFileTimer.end();
540+
537541
return files.map((file, index) => {
538542
errorsReport.inFile(file);
539543
if (!res[index]) { // This should not happen in theory but just to be safe

0 commit comments

Comments
 (0)