fn bail_if_no_data(response: &mut GraphiteResponse, path: &str, no_data_status: Status) {
    let mut bail = false;
    if response.result.is_empty() {
        println!(
            "{}: Graphite returned no matching series for pattern '{}'",
            no_data_status, path
        );
        bail = true;
    }
    let original_len = response.result.len();
    response.filter_to_series_with_data();
    if response.result.is_empty() {
        println!(
            "{}: Graphite found {} series but returned only null datapoints for them",
            no_data_status, original_len
        );
        bail = true;
    }

    if bail {
        println!("INFO: Full query: {}", response.url);
        no_data_status.exit();
    }
}
/// Check if we have any graphite data
///
/// If there is nothing to do, exit
Check if we have any graphite data
If there is nothing to do, exit
Check if we have any graphite data If there is nothing to do exit
fn bail_if_no_data(response: &mut GraphiteResponse, path: &str, no_data_status: Status) {
    let mut bail = false;
    if response.result.is_empty() {
        println!(
            "{}: Graphite returned no matching series for pattern '{}'",
            no_data_status, path
        );
        bail = true;
    }
    let original_len = response.result.len();
    response.filter_to_series_with_data();
    if response.result.is_empty() {
        println!(
            "{}: Graphite found {} series but returned only null datapoints for them",
            no_data_status, original_len
        );
        bail = true;
    }
    if bail {
        println!("INFO: Full query: {}", response.url);
        no_data_status.exit();
    }
}
fn bail_if_no_data ( response : & mut GraphiteResponse , path : & str , no_data_status : Status ) { let mut bail = false ; if response . result . is_empty ( ) { println ! ( " " no_data_status path ) ; bail = true ; } let original_len = response . result . len ( ) ; response . filter_to_series_with_data ( ) ; if response . result . is_empty ( ) { println ! ( " " no_data_status original_len ) ; bail = true ; } if bail { println ! ( " " response url ) ; no_data_status . exit ( ) ; } }
Check if we have any graphite data
If there is nothing to do, exit
Check if we have any graphite data If there is nothing to do exit
response
&mut GraphiteResponse
path
&str
no_data_status
Status
response
&mut GraphiteResponse
path
&str
no_data_status
Status