All Projects → japgolly → Scalajs Benchmark

japgolly / Scalajs Benchmark

Licence: apache-2.0
Benchmarks: write in Scala or JS, run in your browser. Live demo:

Programming Languages

scala
5932 projects
scalajs
39 projects

Projects that are alternatives of or similar to Scalajs Benchmark

Jsbench Me
jsbench.me - JavaScript performance benchmarking playground
Stars: ✭ 50 (-20.63%)
Mutual labels:  benchmark, benchmarking
Pytest Benchmark
py.test fixture for benchmarking code
Stars: ✭ 730 (+1058.73%)
Mutual labels:  benchmark, benchmarking
best
🏆 Delightful Benchmarking & Performance Testing
Stars: ✭ 73 (+15.87%)
Mutual labels:  benchmarking, benchmark
CARLA
CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms
Stars: ✭ 166 (+163.49%)
Mutual labels:  benchmarking, benchmark
Dana
Test/benchmark regression and comparison system with dashboard
Stars: ✭ 46 (-26.98%)
Mutual labels:  benchmark, benchmarking
Unchase.FluentPerformanceMeter
🔨 Make the exact performance measurements of the public methods for public classes using this NuGet Package with fluent interface. Requires .Net Standard 2.0+. It is an Open Source project under Apache-2.0 License.
Stars: ✭ 33 (-47.62%)
Mutual labels:  benchmarking, benchmark
Lzbench
lzbench is an in-memory benchmark of open-source LZ77/LZSS/LZMA compressors
Stars: ✭ 490 (+677.78%)
Mutual labels:  benchmark, benchmarking
language-benchmarks
A simple benchmark system for compiled and interpreted languages.
Stars: ✭ 21 (-66.67%)
Mutual labels:  benchmarking, benchmark
Pytest Django Queries
Generate performance reports from your django database performance tests.
Stars: ✭ 54 (-14.29%)
Mutual labels:  benchmark, benchmarking
Bench Scripts
A compilation of Linux server benchmarking scripts.
Stars: ✭ 873 (+1285.71%)
Mutual labels:  benchmark, benchmarking
bench
⏱️ Reliable performance measurement for Go programs. All in one design.
Stars: ✭ 33 (-47.62%)
Mutual labels:  benchmarking, benchmark
Rtb
Benchmarking tool to stress real-time protocols
Stars: ✭ 35 (-44.44%)
Mutual labels:  benchmark, benchmarking
beapi-bench
Tool for benchmarking apis. Uses ApacheBench(ab) to generate data and gnuplot for graphing. Adding new features almost daily
Stars: ✭ 16 (-74.6%)
Mutual labels:  benchmarking, benchmark
p3arsec
Parallel Patterns Implementation of PARSEC Benchmark Applications
Stars: ✭ 12 (-80.95%)
Mutual labels:  benchmarking, benchmark
LuaJIT-Benchmarks
LuaJIT Benchmark tests
Stars: ✭ 20 (-68.25%)
Mutual labels:  benchmarking, benchmark
Web Tooling Benchmark
JavaScript benchmark for common web developer workloads
Stars: ✭ 290 (+360.32%)
Mutual labels:  benchmark, benchmarking
Tsung
Tsung is a high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc.
Stars: ✭ 2,185 (+3368.25%)
Mutual labels:  benchmark, benchmarking
php-orm-benchmark
The benchmark to compare performance of PHP ORM solutions.
Stars: ✭ 82 (+30.16%)
Mutual labels:  benchmarking, benchmark
Benchmarkdotnet
Powerful .NET library for benchmarking
Stars: ✭ 7,138 (+11230.16%)
Mutual labels:  benchmark, benchmarking
Sysbench Docker Hpe
Sysbench Dockerfiles and Scripts for VM and Container benchmarking MySQL
Stars: ✭ 14 (-77.78%)
Mutual labels:  benchmark, benchmarking

scalajs-benchmark

Build Status

Benchmarks: write in Scala or JS, run in your browser.

See an online demo here: https://japgolly.github.io/scalajs-benchmark/.
The tiny source code is here: gh-pages/demo.

ChangelogsLatest: 0.8.0.

How do I use it?

  1. Include scalajs-benchmark as a dependency in your Scala.JS project.
libraryDependencies += "com.github.japgolly.scalajs-benchmark" %%% "benchmark" % "0.8.0"
  1. You write benchmarks.
import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

object Example {
  val suite = GuiSuite(
    Suite("Example Benchmarks")(

      // Benchmark #1
      Benchmark("foreach") {
        var s = Set.empty[Int]
        (1 to 100) foreach (s += _)
        s
      },

      // Benchmark #2
      Benchmark("fold") {
        (1 to 100).foldLeft(Set.empty[Int])(_ + _)
      }
    )
  )
}

(Hey, can you make that 1 to 100 configurable in the GUI? You sure can.)

  1. Add a tiny loader HTML like this.

  2. Create a main app and point scalajs-benchmark at your suite of benchmarks.

import org.scalajs.dom.document
import japgolly.scalajs.benchmark.gui.BenchmarkGUI

object Main {

  def main(args: Array[String]) = {
    val body = document getElementById "body"
    BenchmarkGUI.renderSuite(body)(Example.suite)
  }
}

If you have a library of different benchmarks, instead of using renderSuite, you use renderMenu to create an app that lets the user navigate the library and run benchmarks.

Example:

BenchmarkGUI.renderMenu(body)(
  suites.example.Examples.all,
  suites.scala.all)
  1. Compile; run in browser. Done.

Support

If you like what I do —my OSS libraries, my contributions to other OSS libs, my programming blog— and you'd like to support me, more content, more lib maintenance, please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.


Note: This is not affiliated with the official Scala.JS project; it's just named to be informative rather than interesting.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].