| 83 | } |
| 84 | |
| 85 | pub fn record_tauri_command_elapsed( |
| 86 | &self, |
| 87 | command: impl Into<String>, |
| 88 | target: Option<&str>, |
| 89 | started_at: Instant, |
| 90 | ) -> u128 { |
| 91 | let duration_ms = elapsed_ms(started_at); |
| 92 | let command = command.into(); |
| 93 | self.record_event( |
| 94 | "native_step_end".to_string(), |
| 95 | Some("tauri_command".to_string()), |
| 96 | Some(command.clone()), |
| 97 | Some(command), |
| 98 | target.map(ToOwned::to_owned), |
| 99 | Some(duration_ms), |
| 100 | ); |
| 101 | duration_ms |
| 102 | } |
| 103 | |
| 104 | pub fn snapshot(&self) -> DesktopStartupTraceSnapshot { |
| 105 | let events = self |