rails_benchmark_suite 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67247c6ec0477941501c1ab15dcbfabd044faa44e790a55e3cf522013bdced08
4
- data.tar.gz: bbeab62787dc1a0a2d09dd0069ba3fd963a76de3a15fcdd950c49e0d36a8e388
3
+ metadata.gz: a480bafc3f61da8710cfa5cf32a5d7923ff58ef34e6df3eca0255213d88c0ce6
4
+ data.tar.gz: e074a613956629715f2dc67da36c105b75ee9a1adb77338f077e741cc9d62ece
5
5
  SHA512:
6
- metadata.gz: c66eaaedc346d2f66f36412d3032de8ef516cca05a2b36c603e3b449ec3ace814370e5347df5ce59acf0126fb3b10c16e5c91950b6a7e3d3a8f5e326d6b92452
7
- data.tar.gz: f0cccded74018456e96b160301e59f0beb4bf787146b4f3939d63e999e48a040c256c8bb17bac3e9b7e41c68895b21dd96827cc2cb4ed54408a402b6a6927b53
6
+ metadata.gz: ab14d38074972f11726e8c7d9fff7663c0fb7e5da300a521c67e5a469c6a4bba23d64c658a55796bf2b6f9dd65627cee855d454e1a4f12847151281c3bc6559e
7
+ data.tar.gz: 82730664fbe2515ccbd75e496debc1ac2f93fe0dbbe38a08f43e01b7c1b4ba341336b1d0876db4bb450404a568408e70d244dcc6f98132cce63a94e180466812
@@ -5,16 +5,3 @@ require "sqlite3"
5
5
 
6
6
  # Silence ActiveRecord logs during benchmarks to avoid IO bottlenecks
7
7
  ActiveRecord::Base.logger = nil
8
-
9
- # Setup In-Memory SQLite globally for all suites
10
- # storage_config = ActiveRecord::DatabaseConfigurations::HashConfig.new("test", "sqlite3", { adapter: "sqlite3", database: ":memory:" })
11
- # Use shared cache to allow threads to see the same in-memory database
12
- # Skip internal database setup if running within a Rails application
13
- unless defined?(Rails)
14
- ActiveRecord::Base.establish_connection(
15
- adapter: "sqlite3",
16
- database: "file:rails_benchmark_suite_mem?mode=memory&cache=shared",
17
- pool: 20,
18
- timeout: 10000
19
- )
20
- end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module RailsBenchmarkSuite
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
@@ -18,6 +18,14 @@ module RailsBenchmarkSuite
18
18
  end
19
19
 
20
20
  def self.run(json: false)
21
+ # Enforce database isolation: Always use in-memory SQLite, ignoring host app DB
22
+ ActiveRecord::Base.establish_connection(
23
+ adapter: "sqlite3",
24
+ database: "file:rails_benchmark_suite_mem?mode=memory&cache=shared",
25
+ pool: 20,
26
+ timeout: 10000
27
+ )
28
+
21
29
  # Load Schema
22
30
  RailsBenchmarkSuite::Schema.load
23
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_benchmark_suite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RailsBenchmarkSuite Contributors