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

thriftrw / thriftrw-python / 640
92%

Build:
DEFAULT BRANCH: master
Ran 05 Dec 2016 10:52PM UTC
Jobs 1
Files 54
Run time 21s
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

pending completion
640

push

travis-ci

clin88
The struct initialization path contained large amounts of unnecessary python interaction.

Moreover, validation did a second pass on all of the fields of the struct.

This PR optimizes struct construction to minimize python interaction and do validation inline, almost doubling performance on the deserialization benchmark:

before
```
---------------------------------------------------------------------- benchmark: 8 tests ---------------------------------------------------------------------
Name (time in us)                                      Min           Max          Mean       StdDev        Median          IQR  Outliers(*)  Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------
test_binary_dumps[nested_structs]               2,081.1558    3,769.8746    2,299.1417     176.8170    2,246.4991     113.2488        40;29     458           1
test_binary_dumps[primitive_containers]        55,597.0669   73,477.9835   60,404.3007   5,612.7009   58,637.9766   5,454.0634          2;2      14           1
test_binary_loads[nested_structs]               8,927.1069   24,309.1583   10,061.6861   2,602.2951    9,428.0243     676.0359          3;7      87           1
test_binary_loads[primitive_containers]        82,612.0377   88,231.0867   85,562.8360   2,014.2171   85,551.9772   3,880.0836          6;0      11           1
```

after
```
--------------------------------------------------------------------- benchmark: 8 tests --------------------------------------------------------------------
Name (time in us)                                      Min           Max          Mean      StdDev        Median         IQR  Outliers(*)  Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------
test_binary_dumps[nested_structs]                 540.9718    1,214.9811      559.2926     59.9792      544.0712      4.7684       82;374    1692           1
test_binary_dumps[primitive_containers]        33,493.9957   47,615.0513   36,780.9772  2,784.0295   36,121.8452  1,756.9661          4;1      25           1
test_binary_loads[nested_structs]               4,345.8939   20,740.9859    4,954.5000  1,984.2548    4,568.4576    330.0905         4;17     212           1
test_binary_loads[primitive_containers]        86,055.0404  104,590.8928   90,237.2837  5,608.9139   88,042.4976  3,389.1201          1;1      10           1
```

2171 of 2931 relevant lines covered (74.07%)

0.74 hits per line

Jobs
ID Job ID Ran Files Coverage
5 640.5 (TOX_ENV=cover) 05 Dec 2016 10:52PM UTC 0
74.07
Travis Job 640.5
Source Files on build 640
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #640
  • 43f8ac4a on github
  • Prev Build on master (#639)
  • Next Build on master (#641)
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