Make nailgun killing faster.

Review Request #2685 - Created Aug. 22, 2015 and submitted

Information
Kris Wilson
pants
kwlzn/nailgun_term
2015, 2040
5d066ee...
Reviewers
pants-reviews
benjyw, jsirois, nhoward_tw, stuhood, zundel
  • Lift and simplify twitter.common.concurrent.deadline + a add couple of related helpers into pants.util.deadline
  • Speed up ProcessManager.terminate() by using a deadline approach vs fixed sleep (addresses #2015)
  • Tests

https://travis-ci.org/pantsbuild/pants/builds/76723332


benchmark (primed via PANTS_DEV=1 ./pants clean-all compile testprojects/src/java/org/pantsbuild/testproject/javasources/::)

before:

[illuminati pants (master)]$ time ./pants ng-killall
...
17:29:04 00:01     [ng-killall]
INFO] killing nailgun server pid=44791
INFO] killing nailgun server pid=44793
INFO] killing nailgun server pid=44807
INFO] killing nailgun server pid=44810
INFO] killing nailgun server pid=44812

17:29:09 00:06   [complete]
               SUCCESS

real  0m6.190s
user  0m0.600s
sys   0m0.226s

after:

[illuminati pants (kwlzn/nailgun_term)]$ time ./pants ng-killall
...
17:27:06 00:00     [ng-killall]
INFO] killing nailgun server pid=44623
INFO] killing nailgun server pid=44629
INFO] killing nailgun server pid=44643
INFO] killing nailgun server pid=44646
INFO] killing nailgun server pid=44648

17:27:06 00:00   [complete]
               SUCCESS

real  0m1.161s
user  0m0.626s
sys   0m0.266s
Eric Ayers
Benjy Weinberger
Kris Wilson
John Sirois
Eric Ayers
Stu Hood
John Sirois
Kris Wilson
Review request changed

Status: Closed (submitted)

Loading...