Skip to content

Commit b75ccb3

Browse files
committed
[perf] pandoc - add pandoc-render to time tracking
1 parent 365780f commit b75ccb3

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/command/render/pandoc.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ import {
204204
import { kFieldCategories } from "../../project/types/website/listing/website-listing-shared.ts";
205205
import { isWindows } from "../../deno_ral/platform.ts";
206206
import { appendToCombinedLuaProfile } from "../../core/performance/perfetto-utils.ts";
207+
import { makeTimedFunctionAsync } from "../../core/performance/function-times.ts";
207208

208209
// in case we are running multiple pandoc processes
209210
// we need to make sure we capture all of the trace files
@@ -1233,14 +1234,18 @@ export async function runPandoc(
12331234

12341235
setupPandocEnv();
12351236

1237+
const pandocRender = makeTimedFunctionAsync("pandoc-render", async () => {
1238+
return await execProcess(
1239+
{
1240+
cmd,
1241+
cwd,
1242+
env: pandocEnv,
1243+
},
1244+
);
1245+
});
1246+
12361247
// run pandoc
1237-
const result = await execProcess(
1238-
{
1239-
cmd,
1240-
cwd,
1241-
env: pandocEnv,
1242-
},
1243-
);
1248+
const result = await pandocRender();
12441249

12451250
// run afterPandoc hooks
12461251
for (const hook of afterPandocHooks) {

0 commit comments

Comments
 (0)