Skip to content

Commit 46565b6

Browse files
committed
remove perf logging
1 parent 0caed3d commit 46565b6

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ export class DataSchemaCompiler {
227227
? files.filter(f => this.filesToCompile.includes(f.fileName)).map(f => ({ ...f }))
228228
: files.map(f => ({ ...f }));
229229

230-
const jinjaLoaderTimer = perfTracker.start('loadJinjaTemplates');
231-
232230
const jinjaTemplatedFiles = toCompile.filter((file) => file.fileName.endsWith('.jinja') ||
233231
(file.fileName.endsWith('.yml') || file.fileName.endsWith('.yaml')) && file.content.match(JINJA_SYNTAX));
234232

@@ -237,8 +235,6 @@ export class DataSchemaCompiler {
237235
this.loadJinjaTemplates(jinjaTemplatedFiles);
238236
}
239237

240-
jinjaLoaderTimer.end();
241-
242238
const errorsReport = new ErrorReporter(null, [], this.errorReportOptions);
243239
this.errorsReporter = errorsReport;
244240

@@ -566,8 +562,6 @@ export class DataSchemaCompiler {
566562
): Promise<(FileContent | undefined)> {
567563
try {
568564
if (getEnv('transpilationNative')) {
569-
const compileJsFileTimer = perfTracker.start('transpileJsFile (native)');
570-
571565
const reqData = {
572566
fileName: file.fileName,
573567
fileContent: file.content,
@@ -589,12 +583,8 @@ export class DataSchemaCompiler {
589583
errorsReport.addWarnings(res[0].warnings as unknown as SyntaxErrorInterface[]);
590584
errorsReport.exitFile();
591585

592-
compileJsFileTimer.end();
593-
594586
return { ...file, content: res[0].code };
595587
} else if (getEnv('transpilationWorkerThreads')) {
596-
const compileJsFileTimer = perfTracker.start('transpileJsFile (threads)');
597-
598588
const data = {
599589
fileName: file.fileName,
600590
content: file.content,
@@ -607,12 +597,8 @@ export class DataSchemaCompiler {
607597
errorsReport.addErrors(res.errors);
608598
errorsReport.addWarnings(res.warnings);
609599

610-
compileJsFileTimer.end();
611-
612600
return { ...file, content: res.content };
613601
} else {
614-
const compileJsFileTimer = perfTracker.start('transpileJsFile (inplace)');
615-
616602
const ast = parse(
617603
file.content,
618604
{
@@ -630,8 +616,6 @@ export class DataSchemaCompiler {
630616

631617
const content = babelGenerator(ast, {}, file.content).code;
632618

633-
compileJsFileTimer.end();
634-
635619
return { ...file, content };
636620
}
637621
} catch (e: any) {
@@ -665,8 +649,6 @@ export class DataSchemaCompiler {
665649
}
666650

667651
if (getEnv('transpilationNative')) {
668-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (native)');
669-
670652
const reqData = {
671653
fileName: file.fileName,
672654
fileContent: file.content,
@@ -685,12 +667,8 @@ export class DataSchemaCompiler {
685667

686668
this.compiledYamlCache.set(cacheKey, res[0].code);
687669

688-
transpileYamlFileTimer.end();
689-
690670
return { ...file };
691671
} else if (getEnv('transpilationWorkerThreads')) {
692-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (threads)');
693-
694672
const data = {
695673
fileName: file.fileName,
696674
content: file.content,
@@ -708,12 +686,8 @@ export class DataSchemaCompiler {
708686

709687
this.compiledYamlCache.set(cacheKey, res.content);
710688

711-
transpileYamlFileTimer.end();
712-
713689
return { ...file };
714690
} else {
715-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (inplace)');
716-
717691
const transpiledFile = this.yamlCompiler.transpileYamlFile(file, errorsReport);
718692

719693
if (transpiledFile) {
@@ -723,8 +697,6 @@ export class DataSchemaCompiler {
723697

724698
this.compiledYamlCache.set(cacheKey, transpiledFile?.content || '');
725699

726-
transpileYamlFileTimer.end();
727-
728700
return transpiledFile;
729701
}
730702
}
@@ -734,8 +706,6 @@ export class DataSchemaCompiler {
734706
errorsReport: ErrorReporter,
735707
options: TranspileOptions
736708
): Promise<(FileContent | undefined)> {
737-
const transpileJinjaFileTimer = perfTracker.start('transpileJinjaFile (common)');
738-
739709
const renderedFile = await this.yamlCompiler.renderTemplate(
740710
file,
741711
this.standalone ? {} : this.cloneCompileContextWithGetterAlias(this.compileContext),
@@ -748,8 +718,6 @@ export class DataSchemaCompiler {
748718
// avoiding costly YAML/Python parsing again.
749719
file.content = renderedFile.content;
750720

751-
transpileJinjaFileTimer.end();
752-
753721
return this.transpileYamlFile(file, errorsReport, options);
754722
}
755723

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { nonStringFields } from './CubeValidator';
1919
import { ErrorReporter } from './ErrorReporter';
2020
import { camelizeCube } from './utils';
2121
import { CompileContext } from './DataSchemaCompiler';
22-
import { perfTracker } from './PerfTracker';
2322

2423
type EscapeStateStack = {
2524
inFormattedStr?: boolean;

0 commit comments

Comments
 (0)