import "library/cpp/getoptpb/proto/confoption.proto";

message TLoadConfig {
    option (NGetoptPb.Title) = "An HTTP 2 load generator.";
    repeated string Base = 1 [
        (NGetoptPb.Conf).Descr = "URL base. Schemes: http, https, h2, h2c, h2d.",
        (NGetoptPb.Conf).Short = 'b',
        (NGetoptPb.Conf).Type  = "<scheme://host:port>"];
    optional uint32 Threads = 2 [default=1,
        (NGetoptPb.Conf).Descr = "# of worker threads.",
        (NGetoptPb.Conf).Short = 't'];
    optional uint32 Connections = 3 [default=100,
        (NGetoptPb.Conf).Descr = "# of connections per thread, distributed equally between URL bases.",
        (NGetoptPb.Conf).Short = 'c'];
    optional bool InOrder = 9 [
        (NGetoptPb.Conf).Descr = "Do not open new connections if some are under the stream limit. May cause uneven load across threads of the target server.",
        (NGetoptPb.Conf).Short = 'i'];
    optional uint32 Streams = 4 [default=1,
        (NGetoptPb.Conf).Descr = "# of concurrent streams per connection (pipelined requests for h1). In h2 mode, server-provided limit also applies.",
        (NGetoptPb.Conf).Short = 's'];
    optional uint32 Retries = 8 [default=0,
        (NGetoptPb.Conf).Descr = "# of retries per request on network errors.",
        (NGetoptPb.Conf).Short = 'm'];
    repeated string RPS = 5 [
        (NGetoptPb.Conf).Descr = "RPS schedule specification. If the last one is a constant, `/time` can be omitted, in which case it is infinite.",
        (NGetoptPb.Conf).Short = 'r',
        (NGetoptPb.Conf).Type  = "<RPS/time or start-end/time>"];
    optional bool PrintErrno = 6 [
        (NGetoptPb.Conf).Descr = "Print some errnos' descriptions (for decoding logs) and exit."];
    repeated string Header = 7 [
        (NGetoptPb.Conf).Descr = "Additional headers to send in the request.",
        (NGetoptPb.Conf).Short = 'H',
        (NGetoptPb.Conf).Type  = "<name: value>"];
}
