Skip to content

Commit fc0ae40

Browse files
committed
tmp
1 parent 41aaadc commit fc0ae40

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,9 @@ jobs:
8989
cat ${{ github.workspace }}/setup.sql | cockroach sql --insecure
9090
- name: Test
9191
run: AR_LOG=summary bundle exec rake test TESTOPTS='--profile=5 --verbose'
92-
- name: Upload queries file
93-
uses: actions/upload-artifact@v3
92+
- name: Upload test information
93+
uses: actions/upload-artifact@v4
9494
if: always()
9595
with:
96-
name: query_time.json
97-
path: tmp/query_time.json
98-
- name: Upload stackprof dump
99-
uses: actions/upload-artifact@v3
100-
if: always()
101-
with:
102-
name: stackprof.dump
103-
path: tmp/stackprof.dump
96+
name: crdb-${{ matrix.crdb }}_ruby-${{ matrix.ruby }})_test_information
97+
path: tmp/*

bin/start-cockroachdb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ die() { echo "$0: $*" 1>&2 ; false; }
66

77
root_dir="$(dirname $(dirname "$0:A"))"
88
pid_file="$root_dir/tmp/cockroach.pid"
9-
log_file="$root_dir/tmp/cockroachdb.log"
9+
log_file="$root_dir/tmp/cockroach.log"
1010

1111
mkdir -p "$root_dir/tmp"
1212
[[ -f "$pid_file" ]] && kill -9 $(cat "$pid_file") || true

test/cases/helper_cockroachdb.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,5 +224,6 @@ class BaseCompatibilityTest < ActiveRecord::TestCase
224224
end
225225

226226
require "stackprof"
227-
StackProf.start(mode: :wall, interval: 1000)
227+
FileUtils.mkdir_p("tmp")
228+
StackProf.start(mode: :wall, interval: 1000, out: "tmp/stackprof.dump")
228229
Minitest.after_run { StackProf.stop; StackProf.results("tmp/stackprof.dump") }

test/support/sql_logger.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def summary_log
2121
time = detail.values.sum { |(total, _, _)| total } / 1_000
2222
count = detail.values.sum { |(_, _, count)| count }
2323
puts "Total time spent in SQL: #{time}s (#{count} queries)"
24-
puts "Detail per query kind available in tmp/query_time.json (total time in ms, avg time in ms, query count). Sorted by avg time."
24+
puts "Detail per query kind available in #{Dir.pwd}/tmp/query_time.json (total time in ms, avg time in ms, query count). Sorted by avg time."
2525
File.write(
26-
"tmp/query_time.json",
26+
Dir.pwd + "/tmp/query_time.json",
2727
JSON.pretty_generate(detail)
2828
)
2929
}

0 commit comments

Comments
 (0)