| // Copyright 2016 The Fuchsia Authors |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| syntax = "proto3"; |
| |
| package cobalt.shuffler; |
| |
| option go_package = "shuffler"; |
| |
| //////////////////////////////////////////////////////////////////////////// |
| // Messages that describe the shuffler configuration. A global configuration |
| // is provided that is applicable to all metrics. |
| //////////////////////////////////////////////////////////////////////////// |
| |
| message Policy { |
| // Specifies Shuffler's dispatch frequency in hours. For example, if |
| // |frequency_in_hours| is 48 then every two days the Shuffler will send |
| // Observations to the Analyzer. |
| uint32 frequency_in_hours = 1; |
| |
| // Specifies the probability of dropping random incoming observations from |
| // Encoder clients before being persisted on Shuffler. For example, if |
| // p=0.25 then each observation would have a 25% chance of being dropped. |
| // It should be a value in the range [0.0, 1.0]. A dropped observation will |
| // not count towards the threshold. |
| float p_observation_drop = 2; |
| |
| // The minimum number of Observations that must be present in a batch |
| // before the Shuffler will dispatch that batch to the Analyzer. |
| // |
| // A batch consists of a collection of Observations that all have the |
| // same |ObservationMetadata| i.e., (metric_id, day_index). The Shuffler |
| // dispatches Observations to the Analyzer on a per-batch basis. |
| // For each batch if the size of that batch is at least |threshold| then |
| // the Observations in that batch will be dispatched to the Analyzer and |
| // deleted from the Shuffler. |
| // |
| // For each batch whose contents are not dispatched to the Analyzer |
| // because the batch size is too small, the Shuffler will delete those |
| // Observations from the batch whose age is at least |disposal_age_days|. |
| uint32 threshold = 3; |
| |
| // The URL of the Analyzer. |
| string analyzer_url = 4; |
| |
| // An Observation that has not been dispatched to the Analyzer will be |
| // discarded after it has been present on the Shuffler for this many |
| // days. |
| uint32 disposal_age_days = 5; |
| } |
| |
| // Provides configuration parameters for Shuffler. An instance of |
| // ShufflerConfig is deserialized from a text file. |
| message ShufflerConfig { |
| Policy global_config = 1; |
| } |