File tree Expand file tree Collapse file tree 5 files changed +24
-4
lines changed Expand file tree Collapse file tree 5 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 3838 runs-on : ubuntu-latest
3939 strategy :
4040 matrix :
41- crdb : [v23.1.11 ]
41+ crdb : [v23.1.15 ]
4242 ruby : [head]
4343 name : Test (crdb=${{ matrix.crdb }} ruby=${{ matrix.ruby }})
4444 steps :
9595 SET CLUSTER SETTING sql.defaults.experimental_temporary_tables.enabled = 'true';
9696 "
9797 - name : Test
98- run : bundle exec rake test TESTOPTS='--profile=3'
98+ run : bundle exec rake test TESTOPTS='--profile=3 --stackprof --profile-setup'
99+ - name : Save timing artifacts
100+ if : ${{ always() }}
101+ uses : actions/upload-artifact@v4
102+ with :
103+ name : performance
104+ path : |
105+ sql.ljson
106+ stackprof-minitest-*.dump
Original file line number Diff line number Diff line change 1- 3.2.1
1+ 3.2.3
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ source "https://rubygems.org"
44
55gemspec
66
7+ gem "minitest-stackprof"
78
89module RailsTag
910 class << self
Original file line number Diff line number Diff line change @@ -176,3 +176,14 @@ def header(stream)
176176end
177177
178178ActiveRecord ::SchemaDumper . prepend ( NoHeaderExt )
179+
180+
181+ ActiveSupport ::Notifications . subscribe 'sql.active_record' do |*args |
182+ event = ActiveSupport ::Notifications ::Event . new ( *args )
183+ sql = event . payload [ :sql ]
184+ duration = event . duration # ms
185+
186+ File . open ( "sql.ljson" , "a" ) do |f |
187+ f . puts JSON . dump ( { sql : sql , duration : duration } )
188+ end
189+ end
Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ def all_test_files
3232
3333 cockroachdb_test_files = FileList [ 'test/cases/**/*_test.rb' ]
3434
35- FileList [ COCKROACHDB_TEST_HELPER ] + activerecord_test_files + cockroachdb_test_files
35+ ( FileList [ COCKROACHDB_TEST_HELPER ] + activerecord_test_files . first ( 2 ) + cockroachdb_test_files . first ( 2 ) )
3636 end
3737end
You can’t perform that action at this time.
0 commit comments