Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run memory comparison script between Prism and Sorbet #243

Open
wants to merge 2 commits into
base: prism
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Command being timed: "bazel-bin/main/sorbet --parser=prism --stop-after=parser ../../Shopify/shopify"
User time (seconds): 311.65
System time (seconds): 30.33
Percent of CPU this job got: 123%
Elapsed (wall clock) time (h:mm:ss or m:ss): 4:36.99
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 877296
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 225456
Voluntary context switches: 89208
Involuntary context switches: 354071
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 0

Command exited with non-zero status 100
Command being timed: "bazel-bin/main/sorbet --parser=sorbet --stop-after=parser ../../Shopify/shopify"
User time (seconds): 771.97
System time (seconds): 27.98
Percent of CPU this job got: 239%
Elapsed (wall clock) time (h:mm:ss or m:ss): 5:34.40
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 1349328
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 342514
Voluntary context switches: 20
Involuntary context switches: 147120
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 100

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Command being timed: "bazel-bin/main/sorbet --parser=prism --stop-after=parser ../yjit-bench/benchmarks"
User time (seconds): 1.81
System time (seconds): 0.18
Percent of CPU this job got: 35%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.69
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 135876
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 38705
Voluntary context switches: 383
Involuntary context switches: 2705
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 0

Command being timed: "bazel-bin/main/sorbet --parser=sorbet --stop-after=parser ../yjit-bench/benchmarks"
User time (seconds): 10.03
System time (seconds): 0.09
Percent of CPU this job got: 181%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.57
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 205288
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 53938
Voluntary context switches: 0
Involuntary context switches: 1746
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 0

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Command exited with non-zero status 100
Command being timed: "bazel-bin/main/sorbet --parser=prism test/prism_regression"
User time (seconds): 1.65
System time (seconds): 0.03
Percent of CPU this job got: 121%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.39
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 69820
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 19420
Voluntary context switches: 0
Involuntary context switches: 1327
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 100

Command exited with non-zero status 100
Command being timed: "bazel-bin/main/sorbet --parser=sorbet test/prism_regression"
User time (seconds): 1.66
System time (seconds): 0.03
Percent of CPU this job got: 122%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.38
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 70564
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 19407
Voluntary context switches: 0
Involuntary context switches: 939
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 100

49 changes: 49 additions & 0 deletions prism_benchmarks/memory/data/pipeline/rbi/2024-09-18-5df44846d.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Command exited with non-zero status 100
Command being timed: "bazel-bin/main/sorbet --parser=prism ../../Shopify/rbi"
User time (seconds): 22.53
System time (seconds): 0.14
Percent of CPU this job got: 349%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.48
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 125744
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 33529
Voluntary context switches: 164
Involuntary context switches: 6882
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 100

Command being timed: "bazel-bin/main/sorbet --parser=sorbet ../../Shopify/rbi"
User time (seconds): 24.78
System time (seconds): 0.17
Percent of CPU this job got: 364%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.85
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 134156
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 35155
Voluntary context switches: 0
Involuntary context switches: 5745
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 16384
Exit status: 0

7 changes: 5 additions & 2 deletions prism_benchmarks/memory/run_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@

YJIT_BENCH_DIR="../yjit-bench"
SHOPIFY_DIR="../../Shopify/shopify"
RBI_DIR="../../Shopify/rbi"

export SORBET_SILENCE_DEV_MESSAGE=1

# Check if required directories exist
for dir in "$YJIT_BENCH_DIR" "$SHOPIFY_DIR"; do
for dir in "$YJIT_BENCH_DIR" "$SHOPIFY_DIR" "$RBI_DIR"; do
if [ ! -d "$dir" ]; then
echo "Please clone the required directories before running this script."
exit 1
Expand Down Expand Up @@ -61,4 +63,5 @@ run_benchmark() {

run_benchmark "Memory Check 1: yjit-bench, parser only" "parser/yjit-bench" "--stop-after=parser $YJIT_BENCH_DIR/benchmarks"
run_benchmark "Memory Check 2: shopify, parser only" "parser/shopify" "--stop-after=parser $SHOPIFY_DIR"
run_benchmark "Memory Check 3: prism regression tests, whole pipeline" "pipeline" "test/prism_regression"
run_benchmark "Memory Check 3: prism regression tests, whole pipeline" "pipeline/prism_regression" "test/prism_regression"
run_benchmark "Memory Check 4: RBI gem, whole pipeline" "pipeline/rbi" $RBI_DIR