Skip to content

RUBY-1250 Run DriverBench benchmarks in Evergreen #2827

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

Merged
merged 11 commits into from
Jan 25, 2024
Merged
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
26 changes: 26 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,19 @@ functions:
set -x
.evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG}

"run benchmarks":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
- command: perf.send
params:
file: "${PROJECT_DIRECTORY}/perf.json"

"run tests":
- command: shell.exec
type: test
Expand Down Expand Up @@ -665,6 +678,9 @@ tasks:
- name: "test-mlaunch"
commands:
- func: "run tests"
- name: "driver-bench"
commands:
- func: "run benchmarks"
- name: "test-via-docker"
commands:
- func: "run tests via docker"
Expand Down Expand Up @@ -1215,6 +1231,16 @@ axes:
USE_PROXY_SERVERLESS: 1

buildvariants:
- matrix_name: DriverBench
matrix_spec:
ruby: "ruby-3.2"
mongodb-version: latest
topology: standalone
run_on: rhel80-large
display_name: DriverBench
tasks:
- name: "driver-bench"

- matrix_name: "auth/ssl"
matrix_spec:
auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
Expand Down
16 changes: 16 additions & 0 deletions .evergreen/config/common.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,19 @@ functions:
set -x
.evergreen/test-on-docker -d ${os} MONGODB_VERSION=${mongodb-version} TOPOLOGY=${topology} RVM_RUBY=${ruby} -s .evergreen/run-tests.sh TEST_CMD=true ${PRELOAD_ARG}

"run benchmarks":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
- command: perf.send
params:
file: "${PROJECT_DIRECTORY}/perf.json"

"run tests":
- command: shell.exec
type: test
Expand Down Expand Up @@ -662,6 +675,9 @@ tasks:
- name: "test-mlaunch"
commands:
- func: "run tests"
- name: "driver-bench"
commands:
- func: "run benchmarks"
- name: "test-via-docker"
commands:
- func: "run tests via docker"
Expand Down
10 changes: 10 additions & 0 deletions .evergreen/config/standard.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
%>

buildvariants:
- matrix_name: DriverBench
matrix_spec:
ruby: <%= latest_ruby %>
mongodb-version: latest
topology: standalone
run_on: rhel80-large
display_name: DriverBench
tasks:
- name: "driver-bench"

- matrix_name: "auth/ssl"
matrix_spec:
auth-and-ssl: ["auth-and-ssl", "noauth-and-nossl"]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gemfiles/*.gemfile.lock
.env.private*
.env
build
profile/benchmarking/data
profile/data
secrets-export.sh
secrets-expansion.yml
atlas-expansion.yml
Expand Down
28 changes: 27 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,32 @@ end

task :release => ['release:check_private_key', 'release:do']

desc 'Build and validate the evergreen config'
task eg: %w[ eg:build eg:validate ]

# 'eg' == 'evergreen', but evergreen is too many letters for convenience
namespace :eg do
desc 'Builds the .evergreen/config.yml file from the templates'
task :build do
ruby '.evergreen/update-evergreen-configs'
end

desc 'Validates the .evergreen/config.yml file'
task :validate do
system 'evergreen validate --project mongo-ruby-driver .evergreen/config.yml'
end

desc 'Updates the evergreen executable to the latest available version'
task :update do
system 'evergreen get-update --install'
end

desc 'Runs the current branch as an evergreen patch'
task :patch do
system 'evergreen patch --uncommitted --project mongo-ruby-driver --browse --auto-description --yes'
end
end

desc "Generate all documentation"
task :docs => 'docs:yard'

Expand All @@ -131,4 +157,4 @@ namespace :docs do
end
end

load 'profile/benchmarking/rake/tasks.rake'
load 'profile/driver_bench/rake/tasks.rake'
6 changes: 6 additions & 0 deletions lib/mongo/grid/fs_bucket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,12 @@ def write_concern
end
end

# Drop the collections that implement this bucket.
def drop
files_collection.drop
chunks_collection.drop
end

private

# @param [ Hash ] opts The options.
Expand Down
62 changes: 0 additions & 62 deletions profile/benchmark_21.rb

This file was deleted.

82 changes: 0 additions & 82 deletions profile/benchmarking.rb

This file was deleted.

Loading