Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

large_resultsets performance example fails due to incorrect parameter name on SimpleCustomer #4528

Closed
Shookit opened this issue Mar 6, 2019 · 4 comments
Labels
bug Something isn't working documentation regression something worked and was broken by a change
Milestone

Comments

@Shookit
Copy link
Contributor

Shookit commented Mar 6, 2019

Executing the performance test yields the following:

python -m examples.performance large_resultsets
Running setup once...
Tests to run: test_orm_full_objects_list, test_orm_full_objects_chunks, test_orm_bundles, test_orm_columns, test_core_fetchall, test_core_fetchmany_w_streaming, test_core_fetchmany, test_dbapi_fetchall_plus_append_objects, test_dbapi_fetchall_no_object
test_orm_full_objects_list : Load fully tracked ORM objects into one big list(). (500000 iterations); total time 22.261599 sec
test_orm_full_objects_chunks : Load fully tracked ORM objects a chunk at a time using yield_per(). (500000 iterations); total time 15.405262 sec
test_orm_bundles : Load lightweight "bundle" objects using the ORM. (500000 iterations); total time 5.298612 sec
test_orm_columns : Load individual columns into named tuples using the ORM. (500000 iterations); total time 3.983049 sec
test_core_fetchall : Load Core result rows using fetchall. (500000 iterations); total time 2.986297 sec
test_core_fetchmany_w_streaming : Load Core result rows using fetchmany/streaming. (500000 iterations); total time 2.523552 sec
test_core_fetchmany : Load Core result rows using Core / fetchmany. (500000 iterations); total time 2.550616 sec
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/sqlalchemy/examples/performance/__main__.py", line 7, in <module>
    Profiler.main()
  File "examples/performance/__init__.py", line 387, in main
    Profiler(args).run()
  File "examples/performance/__init__.py", line 292, in run
    self._run_test(test)
  File "examples/performance/__init__.py", line 322, in _run_test
    self._run_with_time(fn)
  File "examples/performance/__init__.py", line 311, in _run_with_time
    return fn(self.num)
  File "examples/performance/large_resultsets.py", line 148, in test_dbapi_fetchall_plus_append_objects
    _test_dbapi_raw(n, True)
  File "examples/performance/large_resultsets.py", line 187, in _test_dbapi_raw
    id=row[0], name=row[1], description=row[2]
  File "examples/performance/large_resultsets.py", line 173, in __init__
    self.id = id_
NameError: global name 'id_' is not defined
@zzzeek
Copy link
Member

zzzeek commented Mar 6, 2019

oh that's due to the black reformatting, OK

@zzzeek zzzeek assigned sqla-tester and unassigned sqla-tester Mar 6, 2019
@sqla-tester
Copy link
Collaborator

Matt Schuchhardt has proposed a fix for this issue in the master branch:

Fix large_resultsets performance example field name https://gerrit.sqlalchemy.org/1159

@zzzeek zzzeek added bug Something isn't working documentation regression something worked and was broken by a change labels Mar 6, 2019
@zzzeek zzzeek modified the milestones: 1.3.xx, 1.2.x Mar 6, 2019
@sqla-tester
Copy link
Collaborator

Matt Schuchhardt has proposed a fix for this issue in the master branch:

Fix large_resultsets performance example field name https://gerrit.sqlalchemy.org/1159

@sqla-tester
Copy link
Collaborator

Matt Schuchhardt has proposed a fix for this issue in the rel_1_2 branch:

Fix large_resultsets performance example field name https://gerrit.sqlalchemy.org/1160

sqlalchemy-bot pushed a commit that referenced this issue Mar 6, 2019
Fixed bug in large_resultsets example case where a re-named "id" variable
due to code reformatting caused the test to fail.  Pull request courtesy
Matt Schuchhardt.

Fixes: #4528
Closes: #4529
Pull-request: #4529
Pull-request-sha: 8f52f10

Change-Id: Iaca6fd06ec0ede8ff1745d627708ba492a2114c8
(cherry picked from commit 203de69)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation regression something worked and was broken by a change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants