/// Parses rates of Heron operators from a CSV file and stores them in a topology
///
/// # Arguments
///
/// `file`: The path to the CSV file
///
/// `topology`: The topology struct to store the rate information
///
/// `source_rates_file`: The path to an optional CSV file containing true output rates of source operators
///
/// `operator_rates_file`: The path to an optional CSV file containing true processing rates of operators
///
/// `verbose`: A boolean flag to print further information to standard output
///
/// # Comments
///
/// * Each line in `file` contains the true and observed rates of an operator instance aggregated per time window. It has the form:
///
///   `operator_id,instance_id,number_of_operator_instances,window_start_timestamp,true_processing_rate,true_output_rate,observed_processing_rate,observed_output_rate`
///
/// * Each line in `source_rates_file` contains true output rates of source operators. It has the form:
///
///   `operator_id,true_output_rate_per_instance`
///
/// * Each line in `operator_rates_file` contains true processing rates of operators. It has the form:
///
///   `operator_id,true_processing_rate_per_instance`
///
/// * The true output rates in `source_rates_file` and `operator_rates_file` overwrite the respective rates from `file` (if any)
Parses rates of Heron operators from a CSV file and stores them in a topology
Parses rates of Heron operators from a CSV file and stores them in a topology
pub fn read_heron_rates(file: &Path, topology: &mut Topology, source_rates_file: Option<&Path>, operator_rates_file: Option<&Path>,  verbose: bool)
{
    read_flink_rates(file,topology,source_rates_file,verbose);
    // Set true output source rates explicitly
    match source_rates_file
    {
        Some(fp) =>
        {
            let source_rates = parse_operator_rates(fp,verbose);
            set_true_output_rates(topology,source_rates,verbose);
        },
        None => {}
    }
    // Set true processing rates explicitly
    match operator_rates_file
    {
        Some(fp) =>
        {
            let operator_rates = parse_operator_rates(fp,verbose);
            set_true_processing_rates(topology,operator_rates,verbose);
        },
        None => {}
    }
}
pub fn read_heron_rates ( file : & Path , topology : & mut Topology , source_rates_file : Option < & Path > , operator_rates_file : Option < & Path > , verbose : bool ) { read_flink_rates ( file , topology , source_rates_file , verbose ) ; // Set true output source rates explicitly match source_rates_file { Some ( fp ) => { let source_rates = parse_operator_rates ( fp , verbose ) ; set_true_output_rates ( topology , source_rates , verbose ) ; } , None => { } } // Set true processing rates explicitly match operator_rates_file { Some ( fp ) => { let operator_rates = parse_operator_rates ( fp , verbose ) ; set_true_processing_rates ( topology , operator_rates , verbose ) ; } , None => { } } }
Parses rates of Heron operators from a CSV file and stores them in a topology
Parses rates of Heron operators from a CSV file and stores them in a topology
file
&Path
topology
&mut Topology
source_rates_file
Option<&Path>
operator_rates_file
Option<&Path>
verbose
bool
comments
Each line in `file` contains the true and observed rates of an operator instance aggregated per time window. It has the form.



Each line in `source_rates_file` contains true output rates of source operators. It has the form.



Each line in `operator_rates_file` contains true processing rates of operators. It has the form.



The true output rates in `source_rates_file` and `operator_rates_file` overwrite the respective rates from `file` (if any)
Each line in ` file ` contains the true and observed rates of an operator instance aggregated per time window . It has the form . Each line in ` source_rates_file ` contains true output rates of source operators . It has the form . Each line in ` operator_rates_file ` contains true processing rates of operators . It has the form . The true output rates in ` source_rates_file ` and ` operator_rates_file ` overwrite the respective rates from ` file ` ( if any )