Skip to content

Commit faecbaf

Browse files
committed
remove perf logging
1 parent f84eab5 commit faecbaf

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

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

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { CompilerInterface } from './PrepareCompiler';
2323
import { YamlCompiler } from './YamlCompiler';
2424
import { CubeDictionary } from './CubeDictionary';
2525
import { CompilerCache } from './CompilerCache';
26-
import { perfTracker } from './PerfTracker';
2726

2827
const ctxFileStorage = new AsyncLocalStorage<FileContent>();
2928

@@ -215,9 +214,6 @@ export class DataSchemaCompiler {
215214
protected async doCompile() {
216215
const files = await this.repository.dataSchemaFiles();
217216

218-
console.log(`Compiling ${files.length} files...`);
219-
const compileTimer = perfTracker.start('doCompile', true);
220-
221217
this.pythonContext = await this.loadPythonContext(files, 'globals.py');
222218
this.yamlCompiler.initFromPythonContext(this.pythonContext);
223219

@@ -250,8 +246,6 @@ export class DataSchemaCompiler {
250246
}
251247

252248
const transpile = async (stage: CompileStage): Promise<FileContent[]> => {
253-
const transpileTimer = perfTracker.start(`transpilation-stage-${stage}`);
254-
255249
let cubeNames: string[] = [];
256250
let cubeSymbols: Record<string, Record<string, boolean>> = {};
257251
let transpilerNames: string[] = [];
@@ -318,8 +312,6 @@ export class DataSchemaCompiler {
318312
results = await Promise.all(toCompile.map(f => this.transpileFile(f, errorsReport, {})));
319313
}
320314

321-
transpileTimer.end();
322-
323315
return results.filter(f => !!f) as FileContent[];
324316
};
325317

@@ -416,8 +408,6 @@ export class DataSchemaCompiler {
416408
});
417409

418410
const compilePhase = async (compilers: CompileCubeFilesCompilers, stage: 0 | 1 | 2 | 3) => {
419-
const compilePhaseTimer = perfTracker.start(`compilation-phase-${stage}`);
420-
421411
// clear the objects for the next phase
422412
cubes = [];
423413
exports = {};
@@ -426,9 +416,7 @@ export class DataSchemaCompiler {
426416
asyncModules = [];
427417
transpiledFiles = await transpile(stage);
428418

429-
const res = this.compileCubeFiles(cubes, contexts, compiledFiles, asyncModules, compilers, transpiledFiles, errorsReport);
430-
compilePhaseTimer.end();
431-
return res;
419+
return this.compileCubeFiles(cubes, contexts, compiledFiles, asyncModules, compilers, transpiledFiles, errorsReport);
432420
};
433421

434422
return compilePhase({ cubeCompilers: this.cubeNameCompilers }, 0)
@@ -464,12 +452,6 @@ export class DataSchemaCompiler {
464452
} else if (transpilationWorkerThreads && this.workerPool) {
465453
this.workerPool.terminate();
466454
}
467-
468-
// End overall compilation timing and print performance report
469-
compileTimer.end();
470-
setImmediate(() => {
471-
perfTracker.printReport();
472-
});
473455
});
474456
}
475457

@@ -721,22 +703,16 @@ export class DataSchemaCompiler {
721703
if (file.convertedToJs) {
722704
this.compileJsFile(file, errorsReport);
723705
} else if (file.fileName.endsWith('.js')) {
724-
const compileJsFileTimer = perfTracker.start('compileJsFile');
725706
this.compileJsFile(file, errorsReport, { doSyntaxCheck });
726-
compileJsFileTimer.end();
727707
} else if (file.fileName.endsWith('.yml.jinja') || file.fileName.endsWith('.yaml.jinja') ||
728708
(file.fileName.endsWith('.yml') || file.fileName.endsWith('.yaml')) &&
729709
file.content.match(JINJA_SYNTAX)
730710
) {
731-
const compileJinjaFileTimer = perfTracker.start('compileJinjaFile (actually js)');
732711
// original jinja/yaml file was already transpiled into js
733712
this.compileJsFile(file, errorsReport);
734-
compileJinjaFileTimer.end();
735713
} else if (file.fileName.endsWith('.yml') || file.fileName.endsWith('.yaml')) {
736-
const compileYamlFileTimer = perfTracker.start('compileYamlFile (actually js)');
737714
// original yaml file was already transpiled into js
738715
this.compileJsFile(file, errorsReport);
739-
compileYamlFileTimer.end();
740716
}
741717
}
742718

0 commit comments

Comments
 (0)