- Notifications
You must be signed in to change notification settings - Fork26
Add TPC-DS stress tests#17
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-io commentedOct 26, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #17 +/- ##===========================================+ Coverage 77.09% 88.86% +11.77%=========================================== Files 4 2 -2 Lines 502 503 +1 ===========================================+ Hits 387 447 +60+ Misses 115 56 -59
Continue to review full report at Codecov.
|
And add option to run TPC-DS stress test separately.
Also refactor common functions for python tests
MAX_FIRST_GETTING_QS_RETRIES = 10 | ||
PG_QS_DELAY, BEFORE_GETTING_QS_DELAY = 0.1, 0.1 | ||
BEFORE_GETTING_QS, GETTING_QS = range(2) |
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.
These look like constants, so I would prefer to move them to the place nearTPC_DS_EXCLUDE_LIST
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.
Accepted
parser.add_argument('--tpc-ds-setup', dest='tpcds_setup', action='store_true', help='setup database to run TPC-DS benchmark') | ||
parser.add_argument('--tpc-ds-run', dest='tpcds_run', action='store_true', help='run only stress test based on TPC-DS benchmark') |
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.
Why do you separate TPC-DS run and setup? You cannot run tests without a setup I guess. And what is the point to setup without run?
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.
Because the whole task(TPC-DS running) is huge and its running takes much time. Clearly, it have to be decomposed to separate subtasks so to be able to run their more granular. This separation is the fist step to achieve it. In particular, it provides to run tpc-ds bench multiple times for debugging purpose without initializing database at all time.
Yes,tpc-ds-run
requirestpc-ds-setup
and fails until database is initialized properly.
tests/common.py Outdated
@@ -0,0 +1,103 @@ | |||
''' | |||
common.py | |||
Copyright (c) 2016-2019, Postgres Professional |
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.
I guess you can put 2020 everywhere already :)
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.
Done
tests/tpcds.py Outdated
import common | ||
import os | ||
import progressbar | ||
import psycopg2.extensions | ||
import subprocess | ||
import time |
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.
I would prefer following order (built-in library first, extra modules second, local modules last):
importosimporttimeimportsubprocessimportpsycopg2.extensionsimportprogressbarimport .common
Just for cleanliness
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.
Thx, accepted
Uh oh!
There was an error while loading.Please reload this page.
I have tried to focus here only on adding TPC-DS tests. Sergey's solution from#16 was reworked. The key point was to add TPC-DS without affecting all previous test cases.
The following new features added: