How to use the slate-dev-benchmark.Bench function in slate-dev-benchmark

To help you get started, we’ve selected a few slate-dev-benchmark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ianstormtaylor / slate / benchmark / slate-html-serializer / index.js View on Github external
benchmarks.forEach(benchmark => {
      if (include && !benchmark.match(include)) return
      const bench = new Bench(suite, benchmark)
      const dir = resolve(benchmarkDir, benchmark)
      const module = require(dir)
      const fn = module.default
      bench.input(() => module.input)

      bench.run(input => {
        fn(input)
        resetMemoization()
      })
    })
  })
github ianstormtaylor / slate / benchmark / slate-plain-serializer / index.js View on Github external
benchmarks.forEach(benchmark => {
      if (include && !benchmark.match(include)) return
      const bench = new Bench(suite, benchmark)
      const dir = resolve(benchmarkDir, benchmark)
      const module = require(dir)
      const fn = module.default
      bench.input(() => module.input)

      bench.run(input => {
        fn(input)
        resetMemoization()
      })
    })
  })
github ianstormtaylor / slate / benchmark / slate-react / index.js View on Github external
benchmarks.forEach(benchmark => {
      if (include && !benchmark.match(include)) return
      const bench = new Bench(suite, benchmark)
      const dir = resolve(benchmarkDir, benchmark)
      const module = require(dir)
      const fn = module.default
      bench.input(module.input)

      bench.run(input => {
        fn(input)
        resetMemoization()
      })
    })
  })
github ianstormtaylor / slate / benchmark / slate / index.js View on Github external
benchmarks.forEach(benchmark => {
      if (include && !benchmark.match(include)) return
      const bench = new Bench(suite, benchmark)
      const dir = resolve(benchmarkDir, benchmark)
      const module = require(dir)
      const fn = module.default
      bench.input(module.input)

      bench.run(input => {
        fn(input)
        resetMemoization()
      })
    })
  })

slate-dev-benchmark

INTERNAL: A development-only benchmark tool for Slate's core.

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis

Popular slate-dev-benchmark functions

Similar packages