rails_benchmark_suite 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rails_benchmark_suite/runner.rb +7 -5
- data/lib/rails_benchmark_suite/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d942ece685b0dd024227075db9d16fa1d2cca81ee91921d3926814bd033d4c08
|
|
4
|
+
data.tar.gz: dce496aed3eea5cb5448f515e5c029eab4e5ad744ce6bb41666f7525555e9cb9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57f467d74ec8c0f566549ab140935bd19d3b296f727be40f83c4da5c771da4b8594ed54d668ebca17a2937d64b3d2c80efedac2d48617bfcc1c2055886782a65
|
|
7
|
+
data.tar.gz: 11902dda9958604c7c6770c4d43bb123b2f7e9a5f37187cfae73232a9d7ad8ef55fd3b38b360a597652d23ad4e5c2ff157f09aa646ec6005ac40567d7c9891af
|
|
@@ -15,7 +15,7 @@ module RailsBenchmarkSuite
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def run
|
|
18
|
-
# Senior Fix: Isolate from host application's database with Shared Cache (v0.2.
|
|
18
|
+
# Senior Fix: Isolate from host application's database with Shared Cache (v0.2.5)
|
|
19
19
|
ActiveRecord::Base.establish_connection(
|
|
20
20
|
adapter: "sqlite3",
|
|
21
21
|
database: "file::memory:?cache=shared",
|
|
@@ -24,10 +24,12 @@ module RailsBenchmarkSuite
|
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
# SQLite Performance Tuning for multi-threaded benchmarks
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
raw_db = ActiveRecord::Base.connection.raw_connection
|
|
28
|
+
raw_db.execute("PRAGMA journal_mode = WAL") # Write-Ahead Logging
|
|
29
|
+
raw_db.execute("PRAGMA synchronous = NORMAL") # Faster writes
|
|
30
|
+
|
|
31
|
+
# Add a custom busy handler for extra resilience (v0.2.5)
|
|
32
|
+
raw_db.busy_handler { |count| sleep(0.01); count < 100 }
|
|
31
33
|
|
|
32
34
|
# Load Schema
|
|
33
35
|
RailsBenchmarkSuite::Schema.load
|