summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/plugin/plugin_base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-07-14 11:43:29 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-07-14 11:43:29 -0400
commitbe9f433ae38d04a8a52d86df09b760dbbfc6cd3e (patch)
treeb1242b41b148c54eb8193ada133e8a6323694c5a /lib/sqlalchemy/testing/plugin/plugin_base.py
parent116faee662f618d5ecd13b1e074a27d5e5a40564 (diff)
downloadsqlalchemy-be9f433ae38d04a8a52d86df09b760dbbfc6cd3e.tar.gz
Add profile sort option to test suite
I use the nfl sort a lot to see what calling changes are happening between two versions in order to identify the offending code, so add it as a command line option. Change-Id: Ia1ab6dd98012a78298b325bb5c7c050fa9b767c2
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py')
-rw-r--r--lib/sqlalchemy/testing/plugin/plugin_base.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index 4593f1431..859d1d779 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.py
@@ -102,6 +102,13 @@ def setup_options(make_option):
help="Don't run memory profiling tests",
)
make_option(
+ "--profile-sort",
+ type="string",
+ default="cumulative",
+ dest="profilesort",
+ help="Type of sort for profiling standard output",
+ )
+ make_option(
"--postgresql-templatedb",
type="string",
help="name of template database to use for PostgreSQL "
@@ -474,7 +481,8 @@ def _setup_profiling(options, file_config):
from sqlalchemy.testing import profiling
profiling._profile_stats = profiling.ProfileStatsFile(
- file_config.get("sqla_testing", "profile_file")
+ file_config.get("sqla_testing", "profile_file"),
+ sort=options.profilesort,
)