Skip to content

Commit

Permalink
correct stackprof
Browse files Browse the repository at this point in the history
  • Loading branch information
BuonOmo committed Jan 22, 2025
1 parent fe3c598 commit 7f069f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
done
cat ${{ github.workspace }}/setup.sql | cockroach sql --insecure
- name: Test
run: AR_LOG=summary bundle exec rake test TESTOPTS='--profile=5 --verbose'
run: AR_LOG=summary bundle exec rake test TESTOPTS='--stackprof=tmp/stackprof.dump --profile-setup --profile=5 --verbose'
- name: Upload test information
uses: actions/upload-artifact@v4
if: always()
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ group :development, :test do
gem "minitest-github_action_reporter", github: "BuonOmo/minitest-github_action_reporter", require: "minitest/github_action_reporter_plugin"
gem "ostruct", "~> 0.6"

gem "stackprof"
gem "minitest-stackprof"

# Gems used for tests meta-programming.
gem "parser"
Expand Down
7 changes: 4 additions & 3 deletions test/cases/helper_cockroachdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ class BaseCompatibilityTest < ActiveRecord::TestCase
self.use_transactional_tests = false
end

require "stackprof"
FileUtils.mkdir_p("tmp")
StackProf.start(mode: :wall, interval: 1000, out: "tmp/stackprof.dump", raw: true)
Minitest.after_run { StackProf.stop; StackProf.results("tmp/stackprof.dump") }

# require "stackprof"
# StackProf.start(mode: :wall, interval: 1000, out: "tmp/stackprof.dump", raw: true)
# Minitest.after_run { StackProf.stop; StackProf.results("tmp/stackprof.dump") }

0 comments on commit 7f069f2

Please sign in to comment.