Skip to content

Commit

Permalink
Add example run of Rust/Kotlin benchmarks (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
giarc3 authored May 13, 2024
1 parent 769dc62 commit 5707cfc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
23 changes: 23 additions & 0 deletions benches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,26 @@ The TSP's tenant logging mechanism has some tunable limits. By default, a TSP sh
## Other Languages

There are also benchmarks available in [Kotlin](https://github.com/IronCoreLabs/ironcore-alloy/tree/main/kotlin/benchmarks/src) and [Python](https://github.com/IronCoreLabs/ironcore-alloy/blob/main/python/ironcore-alloy/bench.py).

## Results

The following benchmarking run was done on May 7, 2024 on a MacBook Pro (2023) with an Apple M2 Max chip. It uses a locally-built TSP running with the configuration from `demo-tsp.conf`.

```
Standalone - roundtrip 10B
time: [11.515 µs 11.536 µs 11.558 µs]
Standalone - roundtrip 10KB
time: [141.92 µs 142.34 µs 142.75 µs]
Standalone - roundtrip 100KB
time: [1.3312 ms 1.3350 ms 1.3387 ms]
TSP - encrypt 1B time: [55.808 µs 56.149 µs 56.715 µs]
TSP - encrypt 100B time: [56.793 µs 57.152 µs 57.713 µs]
TSP - encrypt 10KB time: [127.61 µs 129.40 µs 131.57 µs]
TSP - encrypt 1MB time: [7.1328 ms 7.1438 ms 7.1613 ms]
TSP - decrypt 1B time: [59.172 µs 59.508 µs 59.865 µs]
TSP - decrypt 100B time: [60.218 µs 60.462 µs 60.695 µs]
TSP - decrypt 10KB time: [132.08 µs 132.43 µs 132.80 µs]
TSP - decrypt 1MB time: [6.8972 ms 6.9199 ms 6.9441 ms]
TSP - batch encrypt 10 documents, 10 fields, 10B
time: [414.47 µs 416.00 µs 417.20 µs]
```
20 changes: 20 additions & 0 deletions kotlin/benchmarks/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,23 @@ The benchmark is using a single tenant, and (depending on your machine and bench
## Other Languages

There are also benchmarks available in [Rust](https://github.com/IronCoreLabs/ironcore-alloy/tree/main/benches) and [Python](https://github.com/IronCoreLabs/ironcore-alloy/blob/main/python/ironcore-alloy/bench.py).

## Results

The following benchmarking run was done on May 7, 2024 on a MacBook Pro (2023) with an Apple M2 Max chip. It uses a locally-built TSP running with the configuration from `demo-tsp.conf`.

```
Benchmark Mode Cnt Score Error Units
SaasShieldBenchmark.batchEncrypt10DocsOf100B avgt 5 545.626 ± 19.272 us/op
SaasShieldBenchmark.tspDecrypt100B avgt 5 148.846 ± 11.811 us/op
SaasShieldBenchmark.tspDecrypt10KB avgt 5 242.892 ± 2.902 us/op
SaasShieldBenchmark.tspDecrypt1B avgt 5 141.517 ± 7.603 us/op
SaasShieldBenchmark.tspDecrypt1MB avgt 5 9104.683 ± 74.820 us/op
SaasShieldBenchmark.tspEncrypt100B avgt 5 142.432 ± 5.696 us/op
SaasShieldBenchmark.tspEncrypt10KB avgt 5 246.627 ± 5.616 us/op
SaasShieldBenchmark.tspEncrypt1B avgt 5 139.817 ± 5.732 us/op
SaasShieldBenchmark.tspEncrypt1MB avgt 5 9322.918 ± 136.650 us/op
StandaloneBenchmark.standaloneRoundtripStandard100Kb avgt 5 117.444 ± 56.447 us/op
StandaloneBenchmark.standaloneRoundtripStandard10B avgt 5 112.489 ± 56.958 us/op
StandaloneBenchmark.standaloneRoundtripStandard10Kb avgt 5 113.051 ± 51.750 us/op
```

0 comments on commit 5707cfc

Please sign in to comment.