-
Notifications
You must be signed in to change notification settings - Fork 791
Closed
Description
Hi,
when I define a hunt with a client rate between 0 and 1, the correct value seems to be stored: In my lab setup it has been possible to reliably schedule one flow per 20min or so. (I need this to be able to run resource-intensive flows on machines that run in overbooked VM environments without risking to bring everything to a halt.)
However, the hunt overview page tells me "No client limit". I found this in the templates:
<dt>Client Rate (clients/min)</dt>
{% if this.client_rate == 0.0 %}
<dd>No rate limit</dd>
{% else %}
<dd>{{ this.client_rate|escape }}</dd>
{% endif %}
Apparently, client_rate has been truncated to an integer value somewhere... Indeed, while HuntRunnerArgs.client_rate defines flows.proto as a float, but api.proto defines ApiHunt.client_rate as an int64.
Would it make sense to change it like this?
diff --git a/grr/proto/api.proto b/grr/proto/api.proto
index 29ed33e..6de1e6c 100644
--- a/grr/proto/api.proto
+++ b/grr/proto/api.proto
@@ -1414,7 +1414,7 @@ message ApiHunt {
optional int64 client_limit = 10 [(sem_type) = {
description: "Client limit.",
}];
- optional int64 client_rate = 11 [(sem_type) = {
+ optional float client_rate = 11 [(sem_type) = {
description: "Client rate.",
}];
optional uint64 created = 12 [(sem_type) = {Metadata
Metadata
Assignees
Labels
No labels