Skip to content

Commit

Permalink
More specific generator timing output (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dionysusnu authored Oct 17, 2023
1 parent 2e37622 commit 1ad8cfc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ void (async () => {
await new EnumGenerator(path.join(targetDir, "generated", "enums.d.ts"), reflectionMetadata).generate(api.Enums);
console.log(`\tDone! (${enumTimer.get()}ms)`);

const classTimer = new Timer();
console.log("\tGenerating classes..");

const definedClassNames = new Set<string>();
for (let i = 0; i < SECURITY_LEVELS.length; i++) {
const classTimer = new Timer();
console.log(`\tGenerating level ${SECURITY_LEVELS[i]} classes..`);

await new ClassGenerator(
path.join(targetDir, "generated", SECURITY_LEVELS[i] + ".d.ts"),
reflectionMetadata,
definedClassNames,
SECURITY_LEVELS[i],
SECURITY_LEVELS[i - 1],
).generate(api.Classes);
}

console.log(`\tDone! (${classTimer.get()}ms)`);
console.log(`\tDone! (${classTimer.get()}ms)`);
}

const typeCheckTimer = new Timer();
console.log("\tTypechecking generated files..");
Expand Down

0 comments on commit 1ad8cfc

Please sign in to comment.