Skip to content

Instantly share code, notes, and snippets.

@ecton
Created September 15, 2021 00:13
Show Gist options
  • Save ecton/e8b7b2f7fa83f663c9fa014eaed80a9c to your computer and use it in GitHub Desktop.
Save ecton/e8b7b2f7fa83f663c9fa014eaed80a9c to your computer and use it in GitHub Desktop.
Roots Async vs Sync
10000 transactions, 1 entries per transaction
+--------+-----------+-----------+----------+----------+------------+----------------+
| target | total (s) | tx/s | min (ms) | max (ms) | stdev (ms) | 99th pctl (ms) |
+--------+-----------+-----------+----------+----------+------------+----------------+
| roots | 0.444 | 22523.758 | 0.022 | 0.694 | 0.014 | 0.079 |
+--------+-----------+-----------+----------+----------+------------+----------------+
| sqlite | 0.360 | 27805.364 | 0.023 | 0.874 | 0.019 | 0.059 |
+--------+-----------+-----------+----------+----------+------------+----------------+
Non-async:
+--------+-----------+-----------+----------+----------+------------+----------------+
| roots | 0.245 | 40755.844 | 0.008 | 0.164 | 0.007 | 0.040 |
+--------+-----------+-----------+----------+----------+------------+----------------+
| sqlite | 0.341 | 29352.602 | 0.022 | 0.599 | 0.017 | 0.053 |
+--------+-----------+-----------+----------+----------+------------+----------------+
1000 transactions, 100 entries per transaction
+--------+-----------+----------+----------+----------+------------+----------------+
| target | total (s) | tx/s | min (ms) | max (ms) | stdev (ms) | 99th pctl (ms) |
+--------+-----------+----------+----------+----------+------------+----------------+
| roots | 0.533 | 1877.381 | 0.466 | 0.921 | 0.042 | 0.699 |
+--------+-----------+----------+----------+----------+------------+----------------+
| sqlite | 0.226 | 4430.786 | 0.177 | 0.516 | 0.033 | 0.401 |
+--------+-----------+----------+----------+----------+------------+----------------+
Non-async:
+--------+-----------+----------+----------+----------+------------+----------------+
| roots | 0.363 | 2757.821 | 0.324 | 0.533 | 0.024 | 0.461 |
+--------+-----------+----------+----------+----------+------------+----------------+
| sqlite | 0.223 | 4480.545 | 0.178 | 0.358 | 0.021 | 0.305 |
+--------+-----------+----------+----------+----------+------------+----------------+
100 transactions, 1000 entries per transaction
+--------+-----------+---------+----------+----------+------------+----------------+
| target | total (s) | tx/s | min (ms) | max (ms) | stdev (ms) | 99th pctl (ms) |
+--------+-----------+---------+----------+----------+------------+----------------+
| roots | 0.372 | 269.170 | 3.588 | 4.261 | 0.103 | 4.039 |
+--------+-----------+---------+----------+----------+------------+----------------+
| sqlite | 0.169 | 593.088 | 0.933 | 1.849 | 0.105 | 1.840 |
+--------+-----------+---------+----------+----------+------------+----------------+
Non-async:
+--------+-----------+---------+----------+----------+------------+----------------+
| roots | 0.309 | 323.919 | 2.939 | 3.399 | 0.071 | 3.302 |
+--------+-----------+---------+----------+----------+------------+----------------+
| sqlite | 0.168 | 595.458 | 0.944 | 1.866 | 0.117 | 1.855 |
+--------+-----------+---------+----------+----------+------------+----------------+
10 transactions, 10000 entries per transaction
+--------+-----------+--------+----------+----------+------------+----------------+
| target | total (s) | tx/s | min (ms) | max (ms) | stdev (ms) | 99th pctl (ms) |
+--------+-----------+--------+----------+----------+------------+----------------+
| roots | 0.368 | 27.205 | 35.380 | 38.141 | 0.751 | 38.141 |
+--------+-----------+--------+----------+----------+------------+----------------+
| sqlite | 0.171 | 58.572 | 10.466 | 18.584 | 2.273 | 18.584 |
+--------+-----------+--------+----------+----------+------------+----------------+
Non-async:
+--------+-----------+--------+----------+----------+------------+----------------+
| roots | 0.320 | 31.284 | 31.632 | 32.350 | 0.219 | 32.350 |
+--------+-----------+--------+----------+----------+------------+----------------+
| sqlite | 0.168 | 59.519 | 9.412 | 18.434 | 2.536 | 18.434 |
+--------+-----------+--------+----------+----------+------------+----------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment