Skip to content

Commit a01cf50

Browse files
committed
Show processing time on finished
Signed-off-by: moznion <moznion@mail.moznion.net>
1 parent 35477bf commit a01cf50

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/cli.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ program
2828
const options = program.opts();
2929

3030
try {
31+
const start = new Date().getTime() / 1000.0;
32+
3133
const inputPath = path.resolve(options["input"]);
3234
const outputPath = path.resolve(options["output"]);
3335

@@ -39,7 +41,12 @@ try {
3941
const clientCode = generateClient(inputPath);
4042

4143
fs.writeFileSync(outputPath, clientCode);
42-
console.log(`🏁 Successfully generated client at: ${outputPath}`);
44+
45+
const end = new Date().getTime() / 1000.0;
46+
47+
console.log(
48+
`🏁 Successfully generated client at [${(end - start).toFixed(2)}ms]: ${outputPath}`,
49+
);
4350
} catch (error) {
4451
console.error(
4552
"😵 Error:",

0 commit comments

Comments
 (0)