Skip to content

Commit b20911c

Browse files
committed
remove perf logging
1 parent cf9ea89 commit b20911c

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

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

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,6 @@ export class DataSchemaCompiler {
636636
): Promise<(FileContent | undefined)> {
637637
try {
638638
if (getEnv('transpilationNative')) {
639-
const compileJsFileTimer = perfTracker.start('transpileJsFile (native)');
640-
641639
const reqData = {
642640
fileName: file.fileName,
643641
fileContent: file.content,
@@ -659,12 +657,8 @@ export class DataSchemaCompiler {
659657
errorsReport.addWarnings(res[0].warnings as unknown as SyntaxErrorInterface[]);
660658
errorsReport.exitFile();
661659

662-
compileJsFileTimer.end();
663-
664660
return { ...file, content: res[0].code };
665661
} else if (getEnv('transpilationWorkerThreads')) {
666-
const compileJsFileTimer = perfTracker.start('transpileJsFile (threads)');
667-
668662
const data = {
669663
fileName: file.fileName,
670664
content: file.content,
@@ -677,12 +671,8 @@ export class DataSchemaCompiler {
677671
errorsReport.addErrors(res.errors);
678672
errorsReport.addWarnings(res.warnings);
679673

680-
compileJsFileTimer.end();
681-
682674
return { ...file, content: res.content };
683675
} else {
684-
const compileJsFileTimer = perfTracker.start('transpileJsFile (inplace)');
685-
686676
const ast = parse(
687677
file.content,
688678
{
@@ -700,8 +690,6 @@ export class DataSchemaCompiler {
700690

701691
const content = babelGenerator(ast, {}, file.content).code;
702692

703-
compileJsFileTimer.end();
704-
705693
return { ...file, content };
706694
}
707695
} catch (e: any) {
@@ -734,8 +722,6 @@ export class DataSchemaCompiler {
734722
}
735723

736724
if (getEnv('transpilationNative')) {
737-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (native)');
738-
739725
const reqData = {
740726
fileName: file.fileName,
741727
fileContent: file.content,
@@ -751,12 +737,8 @@ export class DataSchemaCompiler {
751737

752738
this.compiledYamlCache.set(cacheKey, res[0].code);
753739

754-
transpileYamlFileTimer.end();
755-
756740
return { ...file, content: res[0].code };
757741
} else if (getEnv('transpilationWorkerThreads')) {
758-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (threads)');
759-
760742
const data = {
761743
fileName: file.fileName,
762744
content: file.content,
@@ -773,18 +755,12 @@ export class DataSchemaCompiler {
773755

774756
this.compiledYamlCache.set(cacheKey, res.content);
775757

776-
transpileYamlFileTimer.end();
777-
778758
return { ...file };
779759
} else {
780-
const transpileYamlFileTimer = perfTracker.start('transpileYamlFile (inplace)');
781-
782760
const transpiledFile = this.yamlCompiler.transpileYamlFile(file, errorsReport);
783761

784762
this.compiledYamlCache.set(cacheKey, transpiledFile?.content || '');
785763

786-
transpileYamlFileTimer.end();
787-
788764
return transpiledFile;
789765
}
790766
}
@@ -794,9 +770,8 @@ export class DataSchemaCompiler {
794770
errorsReport: ErrorReporter,
795771
options: TranspileOptions
796772
): Promise<(FileContent | undefined)> {
797-
const renderedFile = this.yamlCompiler.compileYamlWithJinjaFile(
773+
const renderedFile = await this.yamlCompiler.renderTemplate(
798774
file,
799-
errorsReport,
800775
this.standalone ? {} : this.cloneCompileContextWithGetterAlias(this.compileContext),
801776
this.pythonContext!
802777
);

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)