// Store the remote timings into the workunit store.
Store the remote timings into the workunit store.
Store the remote timings into the workunit store .
fn save_workunit_timings(
    &self,
    execute_response: &ExecuteResponse,
    metadata: &ExecutedActionMetadata,
  ) {
    let workunit_state = workunit_store::expect_workunit_state();
    let workunit_store = workunit_state.store;
    let parent_id = workunit_state.parent_id;
    let result_cached = execute_response.get_cached_result();
    match TimeSpan::from_start_and_end(
      metadata.get_queued_timestamp(),
      metadata.get_worker_start_timestamp(),
      "remote queue",
    ) {
      Ok(time_span) => {
        maybe_add_workunit(
          result_cached,
          "remote execution action scheduling",
          time_span,
          parent_id,
          &workunit_store,
          WorkunitMetadata::with_level(Level::Debug),
        );
      }
      Err(s) => warn!("{}", s),
    };
    match TimeSpan::from_start_and_end(
      metadata.get_input_fetch_start_timestamp(),
      metadata.get_input_fetch_completed_timestamp(),
      "remote input fetch",
    ) {
      Ok(time_span) => {
        maybe_add_workunit(
          result_cached,
          "remote execution worker input fetching",
          time_span,
          parent_id,
          &workunit_store,
          WorkunitMetadata::with_level(Level::Debug),
        );
      }
      Err(s) => warn!("{}", s),
    }
    match TimeSpan::from_start_and_end(
      metadata.get_execution_start_timestamp(),
      metadata.get_execution_completed_timestamp(),
      "remote execution",
    ) {
      Ok(time_span) => {
        maybe_add_workunit(
          result_cached,
          "remote execution worker command executing",
          time_span,
          parent_id,
          &workunit_store,
          WorkunitMetadata::with_level(Level::Debug),
        );
      }
      Err(s) => warn!("{}", s),
    }
    match TimeSpan::from_start_and_end(
      metadata.get_output_upload_start_timestamp(),
      metadata.get_output_upload_completed_timestamp(),
      "remote output store",
    ) {
      Ok(time_span) => {
        maybe_add_workunit(
          result_cached,
          "remote execution worker output uploading",
          time_span,
          parent_id,
          &workunit_store,
          WorkunitMetadata::with_level(Level::Debug),
        );
      }
      Err(s) => warn!("{}", s),
    }
  }
fn save_workunit_timings ( & self , execute_response : & ExecuteResponse , metadata : & ExecutedActionMetadata , ) { let workunit_state = workunit_store :: expect_workunit_state ( ) ; let workunit_store = workunit_state . store ; let parent_id = workunit_state . parent_id ; let result_cached = execute_response . get_cached_result ( ) ; match TimeSpan :: from_start_and_end ( metadata . get_queued_timestamp ( ) , metadata . get_worker_start_timestamp ( ) , " " , ) { Ok ( time_span ) => { maybe_add_workunit ( result_cached , " " , time_span , parent_id , & workunit_store , WorkunitMetadata :: with_level ( Level :: Debug ) , ) ; } Err ( s ) => warn ! ( " " s ) , } ; match TimeSpan :: from_start_and_end ( metadata . get_input_fetch_start_timestamp ( ) , metadata . get_input_fetch_completed_timestamp ( ) , " " , ) { Ok ( time_span ) => { maybe_add_workunit ( result_cached , " " , time_span , parent_id , & workunit_store , WorkunitMetadata :: with_level ( Level :: Debug ) , ) ; } Err ( s ) => warn ! ( " " s ) , } match TimeSpan :: from_start_and_end ( metadata . get_execution_start_timestamp ( ) , metadata . get_execution_completed_timestamp ( ) , " " , ) { Ok ( time_span ) => { maybe_add_workunit ( result_cached , " " , time_span , parent_id , & workunit_store , WorkunitMetadata :: with_level ( Level :: Debug ) , ) ; } Err ( s ) => warn ! ( " " s ) , } match TimeSpan :: from_start_and_end ( metadata . get_output_upload_start_timestamp ( ) , metadata . get_output_upload_completed_timestamp ( ) , " " , ) { Ok ( time_span ) => { maybe_add_workunit ( result_cached , " " , time_span , parent_id , & workunit_store , WorkunitMetadata :: with_level ( Level :: Debug ) , ) ; } Err ( s ) => warn ! ( " " s ) , } }
Store the remote timings into the workunit store.
Store the remote timings into the workunit store .
&self
execute_response
&ExecuteResponse
metadata
&ExecutedActionMetadata