[−][src]Crate trawler
This crate provides a workload generator that emulates the traffic to lobste.rs. It is a mostly open-loop benchmark similar to TailBench, but it also approximates the partly open-loop designed outlined in Open Versus Closed: A Cautionary Tale by having clients potentially issue more than one query per request.
The benchmarker has two main components: load generators and issuers. Load generators generate requests according to actual lobste.rs traffic patterns as reported in here, records the request time, and puts the request description into a queue. Issuers take requests from the queue and issues that request to the backend. When the backend responds, the issuer logs how long the request took to process, and how long the request took from when it was generated until it was satisfied (this is called the sojourn time).
Trawler is written so that it can either be run against an instance of
the lobsters Rails app or
directly against a backend by issuing queries. The former is done using the provided binary,
whereas the latter is done by linking against this crate as a library an implementing the
LobstersClient
trait. The latter allows benchmarking a data storage backend without also
incurring the overhead of the Rails frontend. Note that if you want to benchmark against the
Rails application, you must apply the patches in lobsters.diff
first.
Structs
WorkloadBuilder | Set the parameters for a new Lobsters-like workload. |
Enums
LobstersRequest | A single lobste.rs client request. |
Vote | An up or down vote. |
Constants
BASE_OPS_PER_MIN | There were 2893183 relevant requests in the 63166 minutes between 2018-02-11 04:40:31 and 2018-03-27 01:26:49 according to https://lobste.rs/s/cqnzl5/#c_jz5hqv. |
Traits
LobstersClient | Implementors of this trait handle |
Type Definitions
CommentId | A unique lobste.rs six-character comment id. |
StoryId | A unique lobste.rs six-character story id. |
UserId | A unique lobste.rs user id. |