summaryrefslogtreecommitdiff
path: root/test/aaa_profiling
Commit message (Collapse)AuthorAgeFilesLines
* Refactor for cx_Oracle version 6oracle_numericMike Bayer2017-09-111-0/+14
| | | | | | | | | Drops support for cx_Oracle prior to version 5.x, reworks numeric and binary support. Fixes: #4064 Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480
* Add SQL Server CI coverageMike Bayer2017-08-311-1/+1
| | | | Change-Id: Ida0d01ae9bcc0573b86e24fddea620a38c962822
* Isolate memory tests in forksMike Bayer2017-08-141-28/+83
| | | | | | | | | | | | Swing the biggest hammer, run multiprocessing.Process() for each memusage test individually so that they are fully isolated from the parent process and any side effects of pytest-xdist Also add --nomemory as a shortcut to exclude_tags=memory-intensive and add this to the setup.py test runner as the memory tests should not be running for quick runs Change-Id: I3c16c781e21b33deb939a64e77a6e0e41fb86922
* - try adding the prints back in and re-testMike Bayer2017-08-111-8/+8
| | | | Change-Id: I3a82b06ecc3c065240cc05871dee2881f20e414e
* - take more print statements out, maybe this is notMike Bayer2017-08-101-8/+8
| | | | | | | | the issue - unblock pytest-xdist now that the upstream issue is fixed, maybe this old version is the issue Change-Id: I28dd7ae0872948a188651d42e2f4af60bcbafe81
* - dont print samples, this appears like it may beMike Bayer2017-08-081-1/+6
| | | | | | itself causing the memory leak in conjunction with pytest-xdist Change-Id: Ia8704e54186e6dd60ea0e32a246fcf1419686663
* - allow the shrink phase for memusage to go until zeroed,Mike Bayer2017-08-081-3/+12
| | | | | | | some MySQL-env element is causing memory growth that goes very far before stopping Change-Id: Ic0882dd78636067980fceba4e3a969de78d5b26a
* Add selectin loadingMike Bayer2017-04-261-1/+91
| | | | | | | | | | Adding a new kind of relationship loader that is a cross between the "immediateload" and the "subquery" eager loader, using an IN criteria to load related items in bulk immediately after the lead query result is loaded. Change-Id: If13713fba9b465865aef8fd50b5b6b977fe3ef7d Fixes: #3944
* Use baked lazyloading by defaultMike Bayer2017-04-131-1/+2
| | | | | | | | | | | | | The ``lazy="select"`` loader strategy now makes used of the :class:`.BakedQuery` query caching system in all cases. This removes most overhead of generating a :class:`.Query` object and running it into a :func:`.select` and then string SQL statement from the process of lazy-loading related collections and objects. The "baked" lazy loader has also been improved such that it can now cache in most cases where query load options are used. Change-Id: Ic96792fffaa045ae9aa0a4657d6d29235d3efb85 Fixes: #3954
* - try one more test, then we're likely going to give up on cx_OracleMike Bayer2017-04-121-29/+30
| | | | Change-Id: I7f9a1265664b0368ee7a771d01c7ca1612156d1f
* - move a few memusage tests out of "backend". something is up w/ cx_OracleMike Bayer2017-04-121-30/+35
| | | | | | | when the suite runs, such as a background thread or something like that, which is affecting these tests a bit. Change-Id: I52d50a44778ec1eecb8e335ae59b1a4773e80a79
* Warn on _compiled_cache growthMike Bayer2017-04-121-29/+25
| | | | | | | | | | | | | | | | | Added warnings to the LRU "compiled cache" used by the :class:`.Mapper` (and ultimately will be for other ORM-based LRU caches) such that when the cache starts hitting its size limits, the application will emit a warning that this is a performance-degrading situation that may require attention. The LRU caches can reach their size limits primarily if an application is making use of an unbounded number of :class:`.Engine` objects, which is an antipattern. Otherwise, this may suggest an issue that should be brought to the SQLAlchemy developer's attention. Additionally, adjusted the test_memusage algorithm again as the previous one could still allow a growing memory size to be missed. Change-Id: I020d1ceafb7a08f6addfa990a1e7acd09f933240
* Don't cache savepoint identifiersMike Bayer2017-03-061-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | Fixed bug in compiler where the string identifier of a savepoint would be cached in the identifier quoting dictionary; as these identifiers are arbitrary, a small memory leak could occur if a single :class:`.Connection` had an unbounded number of savepoints used, as well as if the savepoint clause constructs were used directly with an unbounded umber of savepoint names. The memory leak does **not** impact the vast majority of cases as normally the :class:`.Connection`, which renders savepoint names with a simple counter starting at "1", is used on a per-transaction or per-fixed-number-of-transactions basis before being discarded. The savepoint name in virtually all cases does not require quoting at all, however to support potential third party use cases the "check for quotes needed" logic is retained, at a small performance cost. Uncondtionally quoting the name is another option, but this would turn the name into a case sensitive name which runs the risk of poor interactions with existing deployments that may be looking at these names in other contexts. Change-Id: I6b53c96abf7fdf1840592bbca5da81347911844c Fixes: #3931
* Performance within instances()Mike Bayer2017-02-231-0/+20
| | | | | | | | | | | | | | | | Continuing from Ie43beecf37945b2bb7fff0aaa597a597293daa18, also observed is the overhead of PathRegsitry memoized token functions, as these paths are not cached in the case of long joinedloader chains. The memoizations here were made with short paths in mind, and have been replaced with an inlined straight create of these paths up front, producing callcounts very similar to 0.8. Combined with the previous optimizations, 1.1 now runs the "joined eager load of one row" worst case test in about 40% fewer calls than 0.8 and 60% fewer than 1.1.5. Change-Id: Ib5e1c1345a1dd8edfbdb3fed06eb717d4e164d31 Fixes: #3915
* Memoize AliasedClass, ClauseAdapter objects in joined eager loadMike Bayer2017-02-161-1/+142
| | | | | | | | | | | | | | | Addressed some long unattended performance concerns within the joined eager loader query construction system. The use of ad-hoc :class:`.AliasedClass` objects per query, which produces lots of column lookup overhead each time, has been replaced with a cached approach that makes use of a small pool of :class:`.AliasedClass` objects that are reused between invocations of joined eager loading. Callcount reduction of SQL query generation for worst-case joined loader scenarios (lots of joins, lots of columns) is reduced by approximately 270%. Change-Id: Ie43beecf37945b2bb7fff0aaa597a597293daa18 Fixes: #3915
* Make all tests to be PEP8 compliantKhairi Hafsham2017-02-073-35/+34
| | | | | | | | tested using pycodestyle version 2.2.0 Fixes: #3885 Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
* Deprecate Mapper.order_byMike Bayer2016-04-191-5/+3
| | | | | | | | | | | This is an old parameter no longer relevant to how SQLAlchemy works, once the Query object was introduced. By deprecating it we establish that we aren't supporting non-working use cases and that we encourage applications to move off of the use of this parameter. Fixes: #3394 Change-Id: I25b9a38142a1537bbcb27d3e8b66a8b265140072
* - fix stray connectionMike Bayer2016-01-231-1/+4
|
* - Added new checks for the common error case of passing mapped classesMike Bayer2015-08-221-2/+2
| | | | | | or mapped instances into contexts where they are interpreted as SQL bound parameters; a new exception is raised for this. fixes #3321
* - revert this change which was inadvertently included in theMike Bayer2015-06-131-2/+1
| | | | fix for #3451
* - add changelog for #3451, with 09485d733131b667813f44eb0b6807b698668ee7 ↵Mike Bayer2015-06-131-1/+2
| | | | | | fixes #3451 - also add a bulk_insert_mappings test
* PEP8 cleanup in /test/aaa_profilingEric Streeper2015-03-183-6/+9
|
* - start locking down querying for cols after observing yesterdaysMike Bayer2015-03-091-0/+52
| | | | | callcount bump due to the slots thing - rewrite profiles using new technique
* - add the test_expire_lots test for comparisonMike Bayer2015-02-181-0/+54
|
* - Fixed a leak which would occur in the unsupported and highlyMike Bayer2014-11-131-0/+26
| | | | | | | | | non-recommended use case of replacing a relationship on a fixed mapped class many times, referring to an arbitrarily growing number of target mappers. A warning is emitted when the old relationship is replaced, however if the mapping were already used for querying, the old relationship would still be referenced within some registries. fixes #3251
* - The :func:`~.expression.column` and :func:`~.expression.table`Mike Bayer2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | constructs are now importable from the "from sqlalchemy" namespace, just like every other Core construct. - The implicit conversion of strings to :func:`.text` constructs when passed to most builder methods of :func:`.select` as well as :class:`.Query` now emits a warning with just the plain string sent. The textual conversion still proceeds normally, however. The only method that accepts a string without a warning are the "label reference" methods like order_by(), group_by(); these functions will now at compile time attempt to resolve a single string argument to a column or label expression present in the selectable; if none is located, the expression still renders, but you get the warning again. The rationale here is that the implicit conversion from string to text is more unexpected than not these days, and it is better that the user send more direction to the Core / ORM when passing a raw string as to what direction should be taken. Core/ORM tutorials have been updated to go more in depth as to how text is handled. fixes #2992
* - A new style of warning can be emitted which will "filter" up toMike Bayer2014-08-311-0/+14
| | | | | | | | | N occurrences of a parameterized string. This allows parameterized warnings that can refer to their arguments to be delivered a fixed number of times until allowing Python warning filters to squelch them, and prevents memory from growing unbounded within Python's warning registries. fixes #3178
* - clean up zoomark a little and try to get new profiles writtenMike Bayer2014-08-302-3/+5
|
* - rework profiling, zoomark tests into single tests so thatMike Bayer2014-08-163-239/+151
| | | | they can be used under xdist
* - turn off the testing reaper here, that's the source of the leaksMike Bayer2014-08-081-12/+14
| | | | | when we are running with pydist, and even when we are running without it in fact...
* - add support for tags, including include/exclude support.Mike Bayer2014-07-271-0/+1
| | | | simplify tox again now that we can exclude tests more easily
* put a greater variance into this test to prevent sporadic failuresMike Bayer2014-07-211-1/+1
|
* imports gone badMike Bayer2014-07-101-2/+2
|
* - fully flake8 test/aaa_profilingMike Bayer2014-07-097-430/+581
|
* Documentation fix-up: "its" vs. "it's"pr/91Matthias Urlichs2014-05-111-1/+1
| | | | | | | | | Removed ungrammatical apostrophes from documentation, replacing "it's" with "its" where appropriate (but in a few cases with "it is" when that read better). While doing that, I also fixed a couple of minor typos etc. as I noticed them.
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-262-3/+3
| | | | Found using: https://github.com/intgr/topy
* fixes to get profiling tests working againMike Bayer2014-03-261-4/+0
|
* use integer division hereMike Bayer2014-03-261-1/+1
|
* - rework memusage tests so that it only runs five iterations at a time, if ↵Mike Bayer2014-03-261-29/+47
| | | | | | it sees success within that period, it's done. memusage tests have become very slow
* - rename __multiple__ to __backend__, and apply __backend__ to a large ↵Mike Bayer2014-03-244-0/+11
| | | | | | number of tests. - move out logging tests from test_execute to test_logging
* - the wrapped memoized_property here was not working, as the attribute nameMike Bayer2013-11-261-0/+60
| | | | didn't match. use straight memoized_props here for now, add a perf test to check it
* - The :class:`.RowProxy` object is now sortable in Python as a regularMike Bayer2013-11-191-0/+1
| | | | | | tuple is; this is accomplished via ensuring tuple() conversion on both sides within the ``__eq__()`` method as well as the addition of a ``__lt__()`` method. [ticket:2848]
* - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynorMike Bayer2013-09-222-2/+0
|
* Improved support for the cymysql driver, supporting version 0.6.5,Mike Bayer2013-08-171-1/+2
| | | | courtesy Hajime Nakagami.
* - Removal of event listeners is now implemented. The feature isMike Bayer2013-07-261-0/+1
| | | | | | | | | | | | | | | | provided via the :func:`.event.remove` function. [ticket:2268] - reorganization of event.py module into a package; with the addition of the docstring work as well as the new registry for removal, there's a lot more code now. the package separates concerns and provides a top-level doc for each subsection of functionality - the remove feature works by providing the EventKey object which associates the user-provided arguments to listen() with a global, weak-referencing registry. This registry stores a collection of _ListenerCollection and _DispatchDescriptor objects associated with each set of arguments, as well as the wrapped function which was applied to that collection. The EventKey can then be recreated for a removal, all the _ListenerCollection and _DispatchDescriptor objects are located, and the correct wrapped function is removed from each one.
* A performance fix related to the usage of the :func:`.defer` optionMike Bayer2013-07-131-1/+53
| | | | | | | | | | | | | 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]
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-2/+3
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* - zoomark testsMike Bayer2013-05-262-0/+4
| | | | - rewrite all profiles, we'll review the diffs to see if anything is too far out
* a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-261-2/+3
| | | | as possible
* - the raw 2to3 runMike Bayer2013-04-276-108/+108
| | | | - went through examples/ and cleaned out excess list() calls