mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Plumb time profiler output into tracing (#34238)
* Plumb time profiler output into tracing Signed-off-by: Delan Azabani <dazabani@igalia.com> * Enter the span tightly around the callback Signed-off-by: Delan Azabani <dazabani@igalia.com> * Use `info_span!()` shorthand Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
495cceb7de
commit
aa7116c75d
16 changed files with 279 additions and 82 deletions
|
@ -7,8 +7,8 @@ use std::io::Error;
|
|||
use ipc_channel::ipc;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::time;
|
||||
use crate::time::{ProfilerCategory, ProfilerChan};
|
||||
use crate::time_profile;
|
||||
|
||||
pub struct IpcReceiver<T>
|
||||
where
|
||||
|
@ -23,7 +23,7 @@ where
|
|||
T: for<'de> Deserialize<'de> + Serialize,
|
||||
{
|
||||
pub fn recv(&self) -> Result<T, ipc::IpcError> {
|
||||
time::profile(
|
||||
time_profile!(
|
||||
ProfilerCategory::IpcReceiver,
|
||||
None,
|
||||
self.time_profile_chan.clone(),
|
||||
|
@ -61,7 +61,7 @@ pub struct IpcBytesReceiver {
|
|||
|
||||
impl IpcBytesReceiver {
|
||||
pub fn recv(&self) -> Result<Vec<u8>, ipc::IpcError> {
|
||||
time::profile(
|
||||
time_profile!(
|
||||
ProfilerCategory::IpcBytesReceiver,
|
||||
None,
|
||||
self.time_profile_chan.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue