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

mvdan / sh / 788
78%

Build:
DEFAULT BRANCH: master
Ran 30 Jun 2017 05:07PM UTC
Jobs 2
Files 18
Run time 41s
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
788

push

travis-ci

mvdan
syntax: attach all comments to nodes

This has several advantages:

* File.Comments is gone.
* The comments for a node can now be found very easily and obtained
  without needing access to File.
* Comments aren't free-floating anymore, so modifying the AST while
  keeping the comments in place is much easier.
* The printer can find the comments to print a lot easier, thus a ~10%
  speedup.

On the other hand:

* The parser has extra work to put the comments in the right place, thus
  is around 5% slower.
* Some nodes are now bigger due to the comment slices, resulting in a
  memory increase of around 5%.

We might be able to get some of the parser speed back at some point. For
now, a 5% slowdown is acceptable given the important wins.

I don't believe there's anything to be done about the memory use. We
could use a linked list to use a single pointer per comment list instead
of three times the space for a slice, but that would be adding
complexity and complicating the use of the AST for little gain.

name                   old time/op    new time/op    delta
Parse/LongStrs-4         5.10µs ± 1%    5.26µs ± 1%   +3.12%  (p=0.002 n=6+6)
Parse/Cmds+Nested-4      6.95µs ± 1%    7.43µs ± 0%   +6.91%  (p=0.002 n=6+6)
Parse/Vars+Clauses-4     5.77µs ± 1%    6.09µs ± 0%   +5.64%  (p=0.004 n=6+5)
Parse/Binary+Redirs-4    6.68µs ± 2%    7.06µs ± 1%   +5.73%  (p=0.002 n=6+6)
Print-4                  3.80µs ± 1%    3.45µs ± 1%   -9.19%  (p=0.004 n=5+6)

name                   old alloc/op   new alloc/op   delta
Parse/LongStrs-4         1.38kB ± 0%    1.47kB ± 0%   +6.36%  (p=0.002 n=6+6)
Parse/Cmds+Nested-4      5.98kB ± 0%    6.67kB ± 0%  +11.51%  (p=0.002 n=6+6)
Parse/Vars+Clauses-4     3.47kB ± 0%    3.92kB ± 0%  +12.90%  (p=0.002 n=6+6)
Parse/Binary+Redirs-4    4.14kB ± 0%    4.65kB ± 0%  +12.37%  (p=0.002 n=6+6)
Print-4                   0.00B          0.00B          ~     (all equal)

This refactor introduced a few regressions, so some tests have been
added to make sure they don't appear again.

5297 of 5561 relevant lines covered (95.25%)

1809.19 hits per line

Jobs
ID Job ID Ran Files Coverage
1 788.1 30 Jun 2017 05:08PM UTC 0
95.25
Travis Job 788.1
2 788.2 30 Jun 2017 05:08PM UTC 0
95.25
Travis Job 788.2
Source Files on build 788
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #788
  • c9172e1e on github
  • Prev Build on master (#787)
  • Next Build on master (#789)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc