Skip to content

Commit 9b9f002

Browse files
authored
Update Saving-and-Replaying-from-file.md
Change due to #1234 Addition concerning latency borrowed from https://github.com/buger/goreplay/blob/master/middleware/README.md?plain=1#L35-L40
1 parent 21b8387 commit 9b9f002

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/Saving-and-Replaying-from-file.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,16 @@ To read or write GZIP compressed files ensure that file extension ends with ".gz
6767
Gor has memory buffer when it writes to file, and continuously flush changes to the file. Flushing to file happens if the buffer is filled, forced flush every 1 second, or if Gor is closed. You can change it using `--output-file-flush-interval` option. It most cases it should not be touched.
6868

6969
### File format
70-
HTTP requests stored as it is, plain text: headers and bodies. Requests separated by `\n🐵🙈🙉\n` line (using such sequence for uniqueness and fun). Before each request goes single line with meta information containing payload type (1 - request, 2 - response, 3 - replayed response), unique request ID (request and response have the same) and timestamp when request was made. An example of 2 requests:
70+
HTTP requests stored as it is, plain text: headers and bodies. Requests separated by `\n🐵🙈🙉\n` line (using such sequence for uniqueness and fun). Before each request goes single line with meta information containing payload type (1 - request, 2 - response, 3 - replayed response), unique request ID (request and response have the same), timestamp when request was made (in nanoseconds) and latency (time difference between request start and finish. For `request` is always zero). An example of 2 requests:
7171

7272
```
73-
1 d7123dasd913jfd21312dasdhas31 127345969\n
73+
1 d7123dasd913jfd21312dasdhas31 1710781031501207115 0\n
7474
GET / HTTP/1.1\r\n
7575
\r\n
7676
\n
7777
🐵🙈🙉
7878
\n
79+
1 a1ba0050a213128487cd25db 1710781031551256751 0\n
7980
POST /upload HTTP/1.1\r\n
8081
Content-Length: 7\r\n
8182
Host: www.w3.org\r\n
@@ -102,4 +103,4 @@ You can loop the same set of files, so when the last one replays all the request
102103
Pass `--input-file-loop` to make it work.
103104

104105
***
105-
You may also read about [[Capturing and replaying traffic]] and [[Rate limiting]]
106+
You may also read about [[Capturing and replaying traffic]] and [[Rate limiting]]

0 commit comments

Comments
 (0)