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

package NUtils;

message TParams {
    option (NGetoptPb.Title) = "Tool for filtering subsource requests to basesearch";

    required string Yt = 1 [(NGetoptPb.Conf).Descr = "YT cluster"];
    required string Eventlog = 2 [(NGetoptPb.Conf).Descr = "YT table with eventlog"];

    optional string SearchQueries = 3 [(NGetoptPb.Conf).Descr = "path to the output file with search queries"];
    optional string FactorQueries = 4 [(NGetoptPb.Conf).Descr = "path to the output file with factor queries"];
    optional string SnippetQueries = 5 [(NGetoptPb.Conf).Descr = "path to the output file with snippet queries"];

    optional string SaveYtOutput = 6 [(NGetoptPb.Conf).Descr = "save parsed eventlog to Yt table"];

    optional uint64 Limit = 7 [
        default = 1000,
        (NGetoptPb.Conf).Descr = "limit number of output queries (0 - unlimited)"
    ];

    optional bool Verbose = 8 [(NGetoptPb.Conf).Descr = "verbose mode"];

    repeated string Include = 9 [(NGetoptPb.Conf).Descr = "grep -P over requests"];
    repeated string Exclude = 10 [(NGetoptPb.Conf).Descr = "grep -P -v over requests"];

    optional float Sample = 11 [default = 1.0, (NGetoptPb.Conf).Descr = "filter out some requests"];
    optional bool AutoSample = 12 [(NGetoptPb.Conf).Descr = "assume that 1) only 5% of input rows are usable; 2) each request type has at least 1% share"];

    optional uint64 MinTimestamp = 13 [(NGetoptPb.Conf).Descr = "filter out requests with ts < MinTimestamp (seconds)"];
    optional uint64 MaxTimestamp = 14 [(NGetoptPb.Conf).Descr = "filter out requests with ts >= MaxTimestamp (seconds)"];

    repeated string Marker = 15 [(NGetoptPb.Conf).Descr = "Marker for classifying request matched by a regexp. Format: name/regexp"];

    optional bool CollectTimings = 16 [(NGetoptPb.Conf).Descr = "Collect subsource request response times"];

    optional bool AllowEmptyReqids = 17 [(NGetoptPb.Conf).Descr = "Do not skip requests with empty reqid"];

    optional bool SyncRequests = 18 [(NGetoptPb.Conf).Descr = "write search/factor/snippet requests from the same frame"];

    repeated string InstanceInclude = 19 [(NGetoptPb.Conf).Descr = "grep -P over instance names"];
    repeated string InstanceExclude = 20 [(NGetoptPb.Conf).Descr = "grep -P -v over instance names"];
}
