-
Notifications
You must be signed in to change notification settings - Fork 2
Add CockroachDB TPC-C benchmark support #15
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
Open
MaximilianJahns
wants to merge
3
commits into
green-coding-solutions:main
Choose a base branch
from
MaximilianJahns:feature/cockroachdb-benchmark
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| test/ | ||
| usage_scenario_*_test.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/tclsh | ||
| puts "SETTING CONFIGURATION" | ||
| dbset db pg | ||
| dbset bm TPC-C | ||
| diset connection pg_host cockroachdb_container | ||
| diset connection pg_port 26257 | ||
| diset connection pg_sslmode disable | ||
| diset tpcc pg_superuser root | ||
| diset tpcc pg_superuserpass "" | ||
| diset tpcc pg_defaultdbase defaultdb | ||
| diset tpcc pg_user root | ||
| diset tpcc pg_pass "" | ||
| diset tpcc pg_dbase defaultdb | ||
| set vu [ numberOfCPUs ] | ||
| set warehouse [ expr {$vu * 20} ] | ||
| diset tpcc pg_count_ware $warehouse | ||
| diset tpcc pg_num_vu $vu | ||
| diset tpcc pg_partition false | ||
| diset tpcc pg_raiseerror true | ||
| puts "SCHEMA BUILD STARTED" | ||
| buildschema | ||
| puts "SCHEMA BUILD COMPLETED" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/tclsh | ||
| puts "SETTING CONFIGURATION" | ||
| dbset db pg | ||
| dbset bm TPC-C | ||
| diset connection pg_host cockroachdb_container | ||
| diset connection pg_port 26257 | ||
| diset connection pg_sslmode disable | ||
| diset tpcc pg_superuser root | ||
| diset tpcc pg_superuserpass "" | ||
| diset tpcc pg_defaultdbase defaultdb | ||
| diset tpcc pg_user root | ||
| diset tpcc pg_pass "" | ||
| diset tpcc pg_dbase defaultdb | ||
| diset tpcc pg_raiseerror true | ||
| puts "DROP SCHEMA STARTED" | ||
| deleteschema | ||
| puts "DROP SCHEMA COMPLETED" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/tclsh | ||
| puts "SETTING CONFIGURATION" | ||
| dbset db pg | ||
| dbset bm TPC-C | ||
| diset connection pg_host cockroachdb_container | ||
| diset connection pg_port 26257 | ||
| diset connection pg_sslmode disable | ||
| diset tpcc pg_superuser root | ||
| diset tpcc pg_superuserpass "" | ||
| diset tpcc pg_defaultdbase defaultdb | ||
| diset tpcc pg_user root | ||
| diset tpcc pg_pass "" | ||
| diset tpcc pg_dbase defaultdb | ||
| diset tpcc pg_driver timed | ||
| diset tpcc pg_rampup 2 | ||
| diset tpcc pg_duration 5 | ||
| diset tpcc pg_allwarehouse true | ||
| diset tpcc pg_timeprofile true | ||
| diset tpcc pg_keyandthink true | ||
| diset tpcc pg_raiseerror true | ||
| loadscript | ||
| puts "TEST STARTED" | ||
| vuset vu vcpu | ||
| vucreate | ||
| tcstart | ||
| tcstatus | ||
| set jobid [ vurun ] | ||
| vudestroy | ||
| tcstop | ||
| puts "TEST COMPLETE" | ||
| set of [ open /tmp/cockroach_tprocc w ] | ||
| puts $of $jobid | ||
| close $of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| name: HammerDB CockroachDB benchmark | ||
| author: Max Jahns | ||
| description: Benchmarks CockroachDB with HammerDB using TPC-C | ||
| compose-file: !include compose.yml | ||
| services: | ||
| postgres: | ||
| mariadb: | ||
| mysql: | ||
| mssql: | ||
| flow: | ||
| - name: Build Warehouses | ||
| container: hammerdb_container | ||
| commands: | ||
| - type: console | ||
| note: RUN HAMMERDB BUILD | ||
| command: ./hammerdbcli auto /tmp/repo/cockroach/cockroach_tprocc_buildschema.tcl | tee /dev/stderr | awk '/System achieved [0-9]+ NOPM/ { match($0, /System achieved [0-9]+ NOPM/); printf("GMT_SCI_R=%s\n", substr($0, RSTART+16, RLENGTH-21)) }' | ||
| shell: sh | ||
| log-stdout: true | ||
| read-sci-stdout: true | ||
| - name: Query Warehouses | ||
| container: hammerdb_container | ||
| commands: | ||
| - type: console | ||
| note: RUN HAMMERDB RUN | ||
| command: ./hammerdbcli auto /tmp/repo/cockroach/cockroach_tprocc_run.tcl | tee /dev/stderr | awk '/System achieved [0-9]+ NOPM/ { match($0, /System achieved [0-9]+ NOPM/); printf("GMT_SCI_R=%s\n", substr($0, RSTART+16, RLENGTH-21)) }' | ||
| shell: sh | ||
| log-stdout: true | ||
| read-sci-stdout: true | ||
| - name: Drop Warehouses | ||
| container: hammerdb_container | ||
| commands: | ||
| - type: console | ||
| note: RUN HAMMERDB DROP | ||
| command: ./hammerdbcli auto /tmp/repo/cockroach/cockroach_tprocc_deleteschema.tcl | tee /dev/stderr | awk '/System achieved [0-9]+ NOPM/ { match($0, /System achieved [0-9]+ NOPM/); printf("GMT_SCI_R=%s\n", substr($0, RSTART+16, RLENGTH-21)) }' | ||
| shell: sh | ||
| log-stdout: true | ||
| read-sci-stdout: true | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File should have an SCI. Please use https://docs.green-coding.io/docs/measuring/carbon/sci/