jupyter/tmpnb — pull request #39 by rgbkrk (2014-09-26 07:00:37+00:00)
Title: Wrap docker client with a thread pool executor

Totally hokey way of wrapping a docker_client.

### Apache Bench results

#### Current master

```
$ ab -n 90 -c 30 127.0.0.1:9999/spawn
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done

Server Software: TornadoServer/4.0.2
Server Hostname: 127.0.0.1
Server Port: 9999

Document Path: /spawn
Document Length: 30 bytes

Concurrency Level: 30
Time taken for tests: 40.626 seconds
Complete requests: 90
Failed requests: 1
(Connect: 0, Receive: 0, Length: 1, Exceptions: 0)
Non-2xx responses: 90
Total transferred: 21960 bytes
HTML transferred: 3830 bytes
Requests per second: 2.22 [#/sec] (mean)
Time per request: 13541.959 [ms] (mean)
Time per request: 451.399 [ms] (mean, across all concurrent requests)
Transfer rate: 0.53 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 1
Processing: 217 13275 6951.6 10548 23371
Waiting: 217 13275 6951.6 10548 23371
Total: 217 13275 6951.5 10549 23371

Percentage of the requests served within a certain time (ms)
50% 10549
66% 13495
75% 21208
80% 22734
90% 23366
95% 23368
98% 23370
99% 23371
100% 23371 (longest request)
```

#### docker_async branch

```
06:52:37 (docker_async=) rgbkrk@metallic ~/tmpnb$ ab -n 90 -c 30 127.0.0.1:9999/spawn
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done

Server Software: TornadoServer/4.0.2
Server Hostname: 127.0.0.1
Server Port: 9999

Document Path: /spawn
Document Length: 30 bytes

Concurrency Level: 30
Time taken for tests: 32.232 seconds
Complete requests: 90
Failed requests: 0
Non-2xx responses: 90
Total transferred: 20880 bytes
HTML transferred: 2700 bytes
Requests per second: 2.79 [#/sec] (mean)
Time per request: 10743.836 [ms] (mean)
Time per request: 358.128 [ms] (mean, across all concurrent requests)
Transfer rate: 0.63 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 1
Processing: 1676 10312 3799.9 7976 17652
Waiting: 1676 10312 3799.9 7976 17652
Total: 1676 10312 3799.8 7977 17652

Percentage of the requests served within a certain time (ms)
50% 7977
66% 8384
75% 15556
80% 15839
90% 15860
95% 15870
98% 15877
99% 17652
100% 17652 (longest request)
```