DenoDDeno
Powered by
abiA
Denoβ€’4y agoβ€’
1 reply
abi

using data from one deno bench in another

is there any good way to re-use the results generated in one deno bench in another one?

example:

Deno.bench({
  name: "parse 1000 source files",
  fn: (): void => {
    sourceFiles.forEach((source) => {
      const ast = parse(source)
    }
  },
})

Deno.bench({
  name: "evaluate 1000 ASTs",
  fn: (): void => {
    sourceFiles.forEach((source) => {
      // note that we're re-parsing here!
      const ast = parse(source)
      const result = evaluate(ast)
    }
  },
})
Deno.bench({
  name: "parse 1000 source files",
  fn: (): void => {
    sourceFiles.forEach((source) => {
      const ast = parse(source)
    }
  },
})

Deno.bench({
  name: "evaluate 1000 ASTs",
  fn: (): void => {
    sourceFiles.forEach((source) => {
      // note that we're re-parsing here!
      const ast = parse(source)
      const result = evaluate(ast)
    }
  },
})
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno bench json
BubblesBBubbles / help
4y ago
Using Deno in Frontend.
MqxMMqx / help
3y ago
Using Superagent in Deno?
abiAabi / help
3y ago