Commit Graph

70 Commits

Author SHA1 Message Date
Eric Streeper 45876612d2 PEP8 cleanup in /test/aaa_profiling 2015-03-18 22:56:18 -07:00
Mike Bayer fcfa62bd76 - start locking down querying for cols after observing yesterdays
callcount bump due to the slots thing
- rewrite profiles using new technique
2015-03-09 13:07:09 -04:00
Mike Bayer 3eff76c4b0 - add the test_expire_lots test for comparison 2015-02-18 15:50:37 -05:00
Mike Bayer ef968470c9 imports gone bad 2014-07-10 11:36:57 -04:00
Mike Bayer 1fc440393a - fully flake8 test/aaa_profiling 2014-07-09 18:59:16 -04:00
Mike Bayer b6411ee3cf fixes to get profiling tests working again 2014-03-26 20:43:20 -04:00
Mike Bayer 2f150bee28 - rename __multiple__ to __backend__, and apply __backend__ to a large number of tests.
- move out logging tests from test_execute to test_logging
2014-03-24 11:33:53 -04:00
Mike Bayer 30a50cc46a - the wrapped memoized_property here was not working, as the attribute name
didn't match.  use straight memoized_props here for now, add a perf test to check it
2013-11-26 23:24:13 -05:00
Mike Bayer 731a4daf63 A performance fix related to the usage of the :func:.defer option
when loading mapped entities.   The function overhead of applying
a per-object deferred callable to an instance at load time was
significantly higher than that of just loading the data from the row
(note that ``defer()`` is meant to reduce DB/network overhead, not
necessarily function call count); the function call overhead is now
less than that of loading data from the column in all cases.  There
is also a reduction in the number of "lazy callable" objects created
per load from N (total deferred values in the result) to 1 (total
number of deferred cols).
[ticket:2778]
2013-07-13 16:29:07 -04:00
Mike Bayer 4b614b9b35 - the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
2013-04-27 19:53:57 -04:00
Mike Bayer 20cdc64588 trying different approaches to test layout. in this one, the testing modules
become an externally usable package but still remains within the main sqlalchemy parent package.
in this system, we use kind of an ugly hack to get the noseplugin imported outside of the
"sqlalchemy" package, while still making it available within sqlalchemy for usage by
third party libraries.
2012-09-27 02:37:33 -04:00
Mike Bayer 48c9993b65 OK! let's turn this around completely. Forget making a single count across
all platforms.  let's instead store callcounts for *all* observed platforms in a datafile.
Will try to get enough platforms in the file for jenkins to have meaningful results.
for platforms not in the file, it's just skiptest.
2012-08-11 15:51:08 -04:00
Mike Bayer 3986fd7626 adjustments 2012-08-11 02:57:25 -04:00
Mike Bayer 2f522bd221 final cleanup 2012-08-10 11:10:21 -04:00
Mike Bayer 442237afaa - a new approach to profiling where we attempt to strip out
parts of the pstats that are idiosyncratic to different platforms.
the goal is no per-version assertions on tests, version differences
in theory would go into the list of profiling exceptions.
2012-08-09 16:08:48 -04:00
Mike Bayer 2bee05098e callcounts due to more engine event logic 2012-07-19 09:49:36 -04:00
Mike Bayer 5b2df4215f relax this variance for now 2012-07-17 09:33:52 -04:00
Mike Bayer 8f04c53191 some test fixes and cleanup 2012-07-16 17:37:32 -04:00
Mike Bayer a1a58219c2 turn commit_all into an iterative method 2012-06-25 13:12:48 -04:00
Mike Bayer df8f0f5d6b obnoxious callcounts 2012-06-16 19:55:35 -04:00
Mike Bayer 405b00f1de callcount 2012-06-11 19:44:58 -04:00
Mike Bayer 34124e6e3a callcount adjust 2012-06-08 14:43:52 -04:00
Mike Bayer 09e8c9240c py3k fixes 2012-04-24 19:15:00 -04:00
Mike Bayer 1bab44c2ba callcount tweak here, this moved up due to r5b6237e3f068 2012-04-24 11:34:56 -04:00
Mike Bayer 101da94e12 the callcounts are greater here since object_mapper() has a little more overhead to it now 2012-04-23 18:53:58 -04:00
Mike Bayer ee5dd855a7 - some adjustments to keep hybrid properties working
- callcount here seems to have gone up by five, reason not certain
2012-04-23 12:48:26 -04:00
Mike Bayer 713a4e19fa - merged #1401 branch from bitbucket
- resolved some serious speed hits I missed, we need to ensure
only deannotated columns are used in the local/remote collections and soforth
so that hash lookups against mapped columns don't dig into __eq__()
- fix some other parity mismatches regarding stuff from [ticket:2453],
including finding another case where _deep_annotate() was doing the wrong thing,
new tests.
- [feature] Major rewrite of relationship()
internals now allow join conditions which
include columns pointing to themselves
within composite foreign keys.   A new
API for very specialized primaryjoin conditions
is added, allowing conditions based on
SQL functions, CAST, etc. to be handled
by placing the annotation functions
remote() and foreign() inline within the
expression when necessary.  Previous recipes
using the semi-private _local_remote_pairs
approach can be upgraded to this new
approach. [ticket:1401]
2012-04-22 19:43:31 -04:00
Mike Bayer 34fd58c793 callcount 2011-12-07 15:14:46 -05:00
Mike Bayer 699146086d - [bug] Fixed bug whereby column_property() created
against ORM-level column could be treated as
a distinct entity when producing certain
kinds of joined-inh joins.  [ticket:2316]

- [bug] related to [ticket:2316], made some
adjustments to the change from [ticket:2261]
regarding the "from" list on a select(). The
_froms collection is no longer memoized, as this
simplifies various use cases and removes the
need for a "warning" if a column is attached
to a table after it was already used in an
expression - the select() construct will now
always produce the correct expression.
There's probably no real-world
performance hit here; select() objects are
almost always made ad-hoc, and systems that
wish to optimize the re-use of a select()
would be using the "compiled_cache" feature.
A hit which would occur when calling select.bind
has been reduced, but the vast majority
of users shouldn't be using "bound metadata"
anyway :).
2011-12-03 19:50:01 -05:00
Mike Bayer 76a9219a1e - Added a slightly nicer __repr__() to SchemaItem
classes.  Note the repr here can't fully support
the "repr is the constructor" idea since schema
items can be very deeply nested/cyclical, have
late initialization of some things, etc.
[ticket:2223]
2011-08-14 12:20:54 -04:00
Mike Bayer f5f49f50c8 - add test profiling merge() behavior when merging lots of bidirectional collections/m2os,
collections present in given merge field.   This shows that the change proposed
in [ticket:2221] adds over 10% method call overhead including significantly more
SQL statements.
2011-08-12 22:48:40 -04:00
Mike Bayer 46ee78431c mark all aaa_profiling tests with __requires__ = 'cpython', 2011-04-23 12:34:38 -07:00
Mike Bayer da938820ec - fix a callcount
- remove extra _load_fixtures() method.   using the classbound version as the fixtures
seem to have everything classlevel at the moment (wondering if we want to change that
for non-classlevel setup/teardown)
2011-03-27 18:16:40 -04:00
Mike Bayer 68a350d462 - remove test.sql._base, test.engine._base, test.orm._base, move those classes to a new test.lib.fixtures module
- move testing.TestBase to test.lib.fixtures
- massive search and replace
2011-03-27 16:27:27 -04:00
Mike Bayer a3083eabf4 - move all the setup_classes(cls) and setup_mappers(cls) to use a
local cls.Basic, cls.Comparable base class so that there is no ambiguity
or hash identity behaviors getting in the way of class registration.
2011-03-27 15:04:06 -04:00
Mike Bayer 14a2fae239 - remove @testing.resolve_artifact_names, replace with direct attribute
access to the cls/self.tables/classes registries
- express orm/_base.py ORMTest in terms of engine/_base.py TablesTest,
factor out common steps into TablesTest, remove AltEngineTest as a
separate class.   will further consolidate these base classes
2011-03-26 19:03:11 -04:00
Mike Bayer 1515073b96 - New DBAPI support for pymysql, a pure Python port
of MySQL-python.  [ticket:1991]
2011-01-26 11:18:03 -05:00
Mike Bayer 350aed3fdb - whitespace removal bonanza 2011-01-02 14:23:42 -05:00
Mike Bayer 1903e4f973 - remove some more 2.4 targets 2010-12-27 14:34:22 -05:00
Mike Bayer fe2d3e0aa2 py3k fixes 2010-12-27 14:17:10 -05:00
Mike Bayer 73f2b37fc9 - remove OrderedSet usage from a critical area 2010-12-22 19:07:04 -05:00
Mike Bayer b79a5e7640 - another heap of inlinings and now I really have to be done with this 2010-12-21 21:37:52 -05:00
Mike Bayer ecb0e53abb - modest inlinings into the MapperProperty.setup/row_processor chain 2010-12-20 20:30:29 -05:00
Mike Bayer 0a6f795615 - callcounts 2010-12-16 21:44:48 -05:00
Mike Bayer f7f6fbede5 - remove the need to use LoadDeferredColumns, LoadLazyAttribute in most cases,
these are back to being part of LoaderStrategy
- simplify attribute.get()
- inline the dict get inside of attribute.__get__()
- revert some memoized attrs from InstanceState which are called in almost
all cases regardless
- inlining
2010-12-16 21:08:26 -05:00
Mike Bayer 86e8e7c558 - why type.dialect_impl(dialect).bind_processor(dialect), caching just the impl?
just call type._cached_bind_processor(dialect), cache the impl *and* the processor function.
same for result sets.
- use plain dict + update for defaultexecutioncontext.execution_options
2010-12-13 00:15:32 -05:00
Mike Bayer b12caa18b5 callcounts 2010-12-12 15:35:21 -05:00
Mike Bayer 0d71ea8126 - inlinings and callcount reductions
- add test coverage for the rare case of noload->lazyload + pickle
2010-12-12 13:01:34 -05:00
Mike Bayer 6d5dd2214a - refactor query._get() into two methods - a static one that does
just the identity map lookup + expired check, the other
which does the load unconditionally.  All the refresh/deferred load
calls use the unconditional load method, query.get() and
LoadLazyAttribute call the identity check by itself first.   m2o
lazyloads for object already in the identity map callcounts are
now cut in half, since no Query object is created.
2010-12-12 01:35:37 -05:00
Mike Bayer 67259bfef1 - callcount
- more inlining
2010-12-09 20:20:23 -05:00