kkebo / zyphy

Zyphy is (or will be) a fast web browser engine written in Swift.
MIT License
4 stars 1 forks source link

Add a benchmark target #3

Closed kkebo closed 1 year ago

kkebo commented 1 year ago
$ swift package benchmark --no-progress
==================
Running Benchmarks
==================

============================================================================================================
Baseline 'Current run'
============================================================================================================

Host 'Xylotrupes-gideon.local' with 8 'arm64' processors with 8 GB memory, running:
Darwin Kernel Version 23.0.0: Fri Jun 30 17:48:23 PDT 2023; root:xnu-10002.0.168.505.3~1/RELEASE_ARM64_T8103

===========
MyBenchmark
===========

TokenizerBenchmark
╒════════════════════════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╤═════════╕
│ Metric                     │      p0 │     p25 │     p50 │     p75 │     p90 │     p99 │    p100 │ Samples │
╞════════════════════════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╪═════════╡
│ Malloc (total)             │      23 │      23 │      23 │      23 │      23 │      23 │      23 │      35 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Memory (resident peak) (M) │      10 │      10 │      10 │      10 │      10 │      10 │      10 │      35 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Throughput (# / s)         │      35 │      35 │      35 │      34 │      34 │      34 │      34 │      35 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Time (total CPU) (ms)      │      28 │      28 │      28 │      29 │      29 │      29 │      29 │      35 │
├────────────────────────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
│ Time (wall clock) (ms)     │      28 │      28 │      28 │      29 │      29 │      29 │      29 │      35 │
╘════════════════════════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╧═════════╛