This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setup: | |
| - !Ubuntu trusty | |
| - !UbuntuUniverse # needed for a2ps | |
| - !Sh "dpkg --add-architecture i386" | |
| - !Install ["libc6:i386", "cups-client"] | |
| - !Install ["ghostscript", "a2ps"] | |
| - !EnsureDir "/usr/share/cups/model" | |
| - !Sh "dpkg -i brdcp7030lpr-2.0.2-1.i386.deb" | |
| - !Sh "dpkg -i cupswrapperDCP7030-2.0.2-1.i386.deb" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loop { | |
| let mut buf = new_buffer(); | |
| try!(read_request(&mut buf)); | |
| let parsed = try!(parse_request(&buf)); | |
| let value = try!(process_request(&parsed)); | |
| try!(send_response(&value)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum FSM { | |
| Reading(Buf), | |
| Processing(Parsed), | |
| Sending(OutBuf), | |
| Idle, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #[derive(PartialEq, Eq, Debug)] | |
| #[must_use] | |
| pub enum Async<M, V> { | |
| Continue(M, V), | |
| Stop, | |
| Timeout(M, SteadyTime), | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn ready(self, events: EventSet, context: &mut C) | |
| -> Async<Self, Option<Self>>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > ./wrk -t8 -c 400 http://127.0.0.1:6754 | |
| Running 10s test @ http://127.0.0.1:6754 | |
| 8 threads and 400 connections | |
| Thread Stats Avg Stdev Max +/- Stdev | |
| Latency 1.01ms 1.41ms 33.06ms 91.36% | |
| Req/Sec 63.02k 18.13k 125.13k 75.50% | |
| 5027436 requests in 10.04s, 421.92MB read | |
| Requests/sec: 500565.14 | |
| Transfer/sec: 42.01MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setup: | |
| - !Ubuntu trusty | |
| - !Install [python] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setup: | |
| - !Alpine v3.2 | |
| - !Install [python] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:trusty | |
| RUN apt-get update && apt-get install -y python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setup: | |
| - !Install [ubuntu] | |
| - !Py3Install | |
| - aiohttp | |
| - pytest |