Commit Graph

60 Commits

Author SHA1 Message Date
Mike Bayer be548690c7 - profile update 2015-09-08 18:15:12 -04:00
Mike Bayer 67a42103d9 - rewrite some profiles that went *down*! woop 2015-09-03 14:39:32 -04:00
Mike Bayer 108c60f460 - The :class:.SessionEvents suite now includes events to allow
unambiguous tracking of all object lifecycle state transitions
in terms of the :class:`.Session` itself, e.g. pending,
transient,  persistent, detached.   The state of the object
within each event is also defined.
fixes #2677
- Added a new session lifecycle state :term:`deleted`.  This new state
represents an object that has been deleted from the :term:`persistent`
state and will move to the :term:`detached` state once the transaction
is committed.  This resolves the long-standing issue that objects
which were deleted existed in a gray area between persistent and
detached.   The :attr:`.InstanceState.persistent` accessor will
**no longer** report on a deleted object as persistent; the
:attr:`.InstanceState.deleted` accessor will instead be True for
these objects, until they become detached.
- The :paramref:`.Session.weak_identity_map` parameter is deprecated.
See the new recipe at :ref:`session_referencing_behavior` for
an event-based approach to maintaining strong identity map behavior.
references #3517
2015-09-02 17:55:15 -04:00
Mike Bayer 5d8a608722 - update 3.4 callcounts 2015-05-01 17:59:11 -04:00
Mike Bayer 26d5983489 - updated counts 2015-03-09 16:02:55 -04:00
Mike Bayer 9afe585f45 - pick around gaining modest dings in callcounts here and there 2015-03-09 14:36:23 -04: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 d70cf329cf - do a full rewrite of callcounts 2015-03-07 18:04:49 -05:00
Mike Bayer 145db3bed7 - repair merge failure 2015-02-19 12:01:22 -05:00
Mike Bayer 3209a73b92 - Mapped state internals have been reworked to allow for a 50% reduction
in callcounts specific to the "expiration" of objects, as in
the "auto expire" feature of :meth:`.Session.commit` and
for :meth:`.Session.expire_all`, as well as in the "cleanup" step
which occurs when object states are garbage collected.
fixes #3307
2015-02-18 16:08:19 -05:00
Mike Bayer 3eff76c4b0 - add the test_expire_lots test for comparison 2015-02-18 15:50:37 -05:00
Mike Bayer 8257b3a017 - more callcounts
- add the platform key to the error output
2015-01-05 12:21:14 -05:00
Mike Bayer 2a28dd9369 - callcounts
- this needs to be serializable and isn't high volume so just whack the slots
2015-01-04 21:01:27 -05:00
Mike Bayer b3bf7915b5 - scale back _Dispatch and _JoinedDispatcher to use a __getitem__ scheme
to start up listener collections; this pulls the overhead off of construction
and makes performance much like the descriptor version, while still allowing
slots.   Fix up some profiles.
2015-01-04 19:05:31 -05:00
Mike Bayer 08e02579e0 - update zoomark 2014-12-12 15:55:34 -05:00
Mike Bayer 6b9f62df10 - force the _has_events flag to True on engines, so that
profiling is more predictable
- restore the profiling from before this change
2014-12-08 11:18:38 -05:00
Mike Bayer 902c8d480b - some profile changes likely due to the change in event listening
on engines
2014-12-08 01:22:37 -05:00
Mike Bayer ee38bcdec2 - refresh all zoomark profiles 2014-11-25 23:29:15 -05:00
Mike Bayer 69979c8b2e - callcounts 2014-11-14 11:07:02 -05:00
Mike Bayer 50d2432a9e - Mysqlconnector as of version 2.0, probably as a side effect of
the  python 3 merge, now does not expect percent signs (e.g.
as used as the modulus operator and others) to be doubled,
even when using the "pyformat" bound parameter format (this
change is not documented by Mysqlconnector).  The dialect now
checks for py2k and for mysqlconnector less than version 2.0
when detecting if the modulus operator should be rendered as
``%%`` or ``%``.
- Unicode SQL is now passed for MySQLconnector version 2.0 and above;
for Py2k and MySQL < 2.0, strings are encoded.  Note that mysqlconnector
as of 2.0.1 appears to have a bug with unicode DDL on py2k, so the tests here
are skipping until we observe it's fixed.
- take out profiling on mysqlconnector, callcounts vary too much with
its current development speed
2014-10-12 20:14:32 -04:00
Mike Bayer 903b0a42e7 - updated callcounts 2014-08-31 15:21:42 -04:00
Mike Bayer 51c7005dc5 - clean up zoomark a little and try to get new profiles written 2014-08-30 00:11:32 -04:00
Mike Bayer a52f84d4d8 - bump callcounts down 2014-08-29 19:16:29 -04:00
Mike Bayer 08d2c863df - dropping callcounts 2014-08-29 11:22:54 -04:00
Mike Bayer b577afcb2b - rework profiling, zoomark tests into single tests so that
they can be used under xdist
2014-08-16 19:49:07 -04:00
Mike Bayer e41af7fcfd - reset callcounts 2014-05-24 16:49:25 -04:00
Mike Bayer 4d4abd2f76 - revert the memoized committed_state / callables changes as they appear to add to lazy loading.
not really clear which approach is better in the long run.
2014-05-24 16:28:23 -04:00
Mike Bayer 66f2e1257a - back off the callcounts a bit for the boolean fix
- rewrite callcounts for select()
2014-04-01 18:29:54 -04:00
Mike Bayer 50576a01eb - Tweaked the settings for mysql-connector-python; in Py2K, the
"supports unicode statements" flag is now False, so that SQLAlchemy
will encode the *SQL string* (note: *not* the parameters)
to bytes before sending to the database.  This seems to allow
all unicode-related tests to pass for mysql-connector, including those
that use non-ascii table/column names, as well as some tests for the
TEXT type using unicode under cursor.executemany().
- other mysql-connector fixes; latest version seems to do better on
function call counts
2014-03-27 19:18:06 -04:00
Mike Bayer e3a1a2d01c - fixes to multi-backend tests
- move the logic to determine "test id" into plugin_base
- update callcounts
2014-03-27 13:17:20 -04:00
Mike Bayer ae7e0a2721 some profile updates... 2014-03-23 21:39:17 -04:00
Mike Bayer 2469b651e6 fix the profiling ids here 2014-03-03 18:43:28 -05:00
Mike Bayer ea05a23218 - Support has been added for pytest to run tests. This runner
is currently being supported in addition to nose, and will likely
be preferred to nose going forward.   The nose plugin system used
by SQLAlchemy has been split out so that it works under pytest as
well.  There are no plans to drop support for nose at the moment
and we hope that the test suite itself can continue to remain as
agnostic of testing platform as possible.  See the file
README.unittests.rst for updated information on running tests
with pytest.

The test plugin system has also been enhanced to support running
tests against mutiple database URLs at once, by specifying the ``--db``
and/or ``--dburi`` flags multiple times.  This does not run the entire test
suite for each database, but instead allows test cases that are specific
to certain backends make use of that backend as the test is run.
When using pytest as the test runner, the system will also run
specific test suites multiple times, once for each database, particularly
those tests within the "dialect suite".   The plan is that the enhanced
system will also be used by Alembic, and allow Alembic to run
migration operation tests against multiple backends in one run, including
third-party backends not included within Alembic itself.
Third party dialects and extensions are also encouraged to standardize
on SQLAlchemy's test suite as a basis; see the file README.dialects.rst
for background on building out from SQLAlchemy's test platform.
2014-03-03 15:55:17 -05:00
Mike Bayer 62ec682239 - a little bit of profile bump, just on insert not too concerned 2014-01-13 16:35:50 -05: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 0e7a82304a some zoomark tests without c exts callcounts updated 2013-10-21 23:34:02 -04:00
Mike Bayer d363a4b0bb - fix a bunch of test failures 2013-10-08 10:42:13 -04:00
Mike Bayer 03c9b2df77 - fix bug here in profiling.py
- callcount
2013-08-28 10:19:11 -04:00
Mike Bayer 87b9f48c57 - rework the profile thing to just rewrite all failing numbers when --write-profiles is set
- some sqlite callcounts
2013-08-28 00:04:38 -04:00
Mike Bayer 5672f78806 callcounts 2013-08-27 23:51:34 -04:00
Mike Bayer 031ef08078 - A rework to the way that "quoted" identifiers are handled, in that
instead of relying upon various ``quote=True`` flags being passed around,
these flags are converted into rich string objects with quoting information
included at the point at which they are passed to common schema constructs
like :class:`.Table`, :class:`.Column`, etc.   This solves the issue
of various methods that don't correctly honor the "quote" flag such
as :meth:`.Engine.has_table` and related methods.  The :class:`.quoted_name`
object is a string subclass that can also be used explicitly if needed;
the object will hold onto the quoting preferences passed and will
also bypass the "name normalization" performed by dialects that
standardize on uppercase symbols, such as Oracle, Firebird and DB2.
The upshot is that the "uppercase" backends can now work with force-quoted
names, such as lowercase-quoted names and new reserved words.
[ticket:2812]
2013-08-27 20:43:22 -04:00
Mike Bayer a6adc0a53e - The C extensions are ported to Python 3 and will build under
any supported CPython 2 or 3 environment. [ticket:2161]
2013-07-26 20:50:18 -04:00
Mike Bayer 171f8d4265 typo 2013-07-13 18:24:25 -04: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 52107586fe callcounts 2013-07-08 14:02:46 -04:00
Mike Bayer faa2b43c6c profile tweak 2013-07-02 15:33:00 -04:00
Mike Bayer d3d10c982c - refactor pool a bit so that intent between ConnectionRecord/ConnectionFairy is clear;
make sure that the DBAPI connection passed to the reset-on-return events/dialect hooks
is also a "fairy", so that dictionaries like "info" are available.  [ticket:2770]
- rework the execution_options system so that the dialect is given the job of making
any immediate adjustments based on a set event.  move the "isolation level" logic to use
this new system.   Also work things out so that even engine-level execution options
can be used for things like isolation level; the dialect attaches a connect-event
handler in this case to handle the task.
- to support this new system as well as further extensibiltiy of execution options
add events engine_connect(), set_connection_execution_options(), set_engine_execution_options()
2013-07-02 13:14:21 -04:00
Mike Bayer 26ec0507be Merge branch 'ticket_2587'
Conflicts:
	test/profiles.txt
	test/sql/test_selectable.py
2013-06-04 21:38:56 -04:00
Mike Bayer ae2561a7d1 callcounts 2013-06-04 20:53:38 -04:00
Mike Bayer f1bdc3e999 - clean up some of the requires for cross-schema reflection
- add oracle profile counts
2013-06-03 18:11:32 -04:00