diff --git a/README.md b/README.md index 094b749..2d9f2ac 100644 --- a/README.md +++ b/README.md @@ -2,64 +2,94 @@ Serves recorded response sets for benchmarking. +The goal is to serve recorded responses with low variance in memory and CPU cost. + +## Building + +Follow the instructions at https://rustup.rs. + +As of this writing, tracerbench-serve requires the latest Rust beta. + +```sh +rustup toolchain install beta +``` + +```sh +cargo build --release +``` + ## recorded response set Serde deserialize format: -Recorded response sets -Seq (len 6) - Body table - Header name table - Header value table - Headers table - Response table - Recorded response set table - -Body table: -Seq of - Bytes - -Header name table: -Seq of - String - -Header value table: -Seq of - String - -Headers table -Seq of - Seq of - ( - usize, // name table index - usize, // value table index - ) - -Response table -Seq of - ( - u16, // status - usize, // headers table index - Option, // body table index - ) - -Response set table -Seq of - Map - socksPort: u16, - name: String, - entryKey: String, - requestKeyProgram: Request key, - requestKeyMap: - Map String: usize // key to response_index - -Request key -Seq - literals - Bytes - -literals - Map - type: String, - content: Value +### Recorded response sets: + +- Seq length 6 + - Body table + - Header name table + - Header value table + - Headers table + - Response table + - Recorded response set table + +### Body table: + +- Seq of + - Bytes + +### Header name table: + +- Seq of + - String + +### Header value table: + +- Seq of + - String + +### Headers table + +- Seq of + - Seq of + - Seq length 2 + - usize ( name table index ) + - usize ( value table index ) + +### Response table + +- Seq of + - Seq length 3 + - u16 ( status ) + - usize ( headers table index ) + - Option ( body table index ) + +### Response set table + +- Seq of + - Map + - socksPort: + - u16 + - name: + - String + - entryKey: + - String + - requestKeyProgram: + - Request key + - requestKeyMap: + - Map + - String: ( request key ) + - usize ( response_index ) + +### Request key + +- Seq length 2 + program literals + Bytes (program bytecode) + +#### program literals +- Map + - type: + - String + - content: + - Value