• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

chop-dbhi / avocado / 671 / 4
81%
master: 80%

Build:
Build:
LAST BUILD BRANCH: instance-cache-key
DEFAULT BRANCH: master
Ran 02 Feb 2015 01:52PM UTC
Files 67
Run time 29s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Feb 2015 01:51PM UTC coverage: 81.281%. Remained the same
DJANGO=1.6.10 POSTGRES_TEST_USER=postgres POSTGRES_TEST_NAME=avocado MYSQL_TEST_USER=root MYSQL_TEST_NAME=avocado

push

travis-ci

bruth
Refactor formatter to reduce overhead

A call to formatter(...) was doing a lot of work for every row being
processed. The primary slow spots are:

- Format methods being dynamically accessed via getattr() on every loop
- Unpacking keyword arguments (**kwargs) in the method call
- Building and moving OrderedDict values
- Logging a message when a value failed be coerced

To remediate these issues, targeted format methods are now processed
at initialization rather that process time. This requires the list of
formats to be passed into the constructor and not in the __call__ method.

Keyword arguments passed in during a call are no longer unpacked in the
method call, but are passed as a keyword argument itself, `kwargs`.

Use of OrderedDict has been removed altogether. These structures take up
a lot of memory and have proven to add little value during processing.
This required adding a method for getting the header/field data for the
values being processed. This is also a desirable change for addressing
#99 and #255.

Logging has been addressed by only doing while in DEBUG mode. Since the
exception is skipped, there is no point in logging the errors while in
production.

The exporters have been updated to accommodate this changes. In addition,
new read methods have been implemented for performance testing including
cached and threaded versions. The previous read method have been renamed
to manual_read since it performs manual limit and offsetting and distinct
checking.

To accommodate the new read method, the `write` on all exporters have been
changed to not call `read` itself. This change requires the passed iterable
to already contain the formatted rows.

Note: This refactor requires backwards incompatible changes to get the
performance gains.

Signed-off-by: Byron Ruth <b@devel.io>

3161 of 3889 relevant lines covered (81.28%)

0.81 hits per line

Source Files on job 671.4 (DJANGO=1.6.10 POSTGRES_TEST_USER=postgres POSTGRES_TEST_NAME=avocado MYSQL_TEST_USER=root MYSQL_TEST_NAME=avocado)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 671
  • Travis Job 671.4
  • f434ee72 on github
  • Prev Job for DJANGO=1.6.10 POSTGRES_TEST_USER=postgres POSTGRES_TEST_NAME=avocado MYSQL_TEST_USER=root MYSQL_TEST_NAME=avocado on refactor-export (#670.4)
  • Next Job for DJANGO=1.6.10 POSTGRES_TEST_USER=postgres POSTGRES_TEST_NAME=avocado MYSQL_TEST_USER=root MYSQL_TEST_NAME=avocado on refactor-export (#672.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc