aboutsummaryrefslogtreecommitdiffstats
path: root/components/profile
diff options
context:
space:
mode:
authorBastien Orivel <eijebong@bananium.fr>2018-08-27 18:36:52 +0200
committerBastien Orivel <eijebong@bananium.fr>2018-11-01 19:17:36 +0100
commit024b40b39d3848f1a1f7020bd7ed8c901817f09c (patch)
tree27508f102b0973cbae3dca22143ea4aedd349f4b /components/profile
parent95bfaa0a770479fb3bf6bf0b1f85c9ae343e66ff (diff)
downloadservo-024b40b39d3848f1a1f7020bd7ed8c901817f09c.tar.gz
servo-024b40b39d3848f1a1f7020bd7ed8c901817f09c.zip
Update hyper to 0.12
Diffstat (limited to 'components/profile')
-rw-r--r--components/profile/Cargo.toml3
-rw-r--r--components/profile/lib.rs1
-rw-r--r--components/profile/time.rs8
3 files changed, 8 insertions, 4 deletions
diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml
index 7b9d79a7a8f..890a9aa9336 100644
--- a/components/profile/Cargo.toml
+++ b/components/profile/Cargo.toml
@@ -14,7 +14,7 @@ unstable = ["jemalloc-sys"]
[dependencies]
profile_traits = {path = "../profile_traits"}
-influent = "0.4"
+influent = "0.5"
ipc-channel = "0.11"
heartbeats-simple = "0.4"
log = "0.4"
@@ -22,6 +22,7 @@ serde = "1.0"
serde_json = "1.0"
servo_config = {path = "../config"}
time = "0.1.12"
+tokio = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
task_info = {path = "../../support/rust-task_info"}
diff --git a/components/profile/lib.rs b/components/profile/lib.rs
index d01aad61cd0..248fd0ab19b 100644
--- a/components/profile/lib.rs
+++ b/components/profile/lib.rs
@@ -25,6 +25,7 @@ extern crate servo_config;
#[cfg(target_os = "macos")]
extern crate task_info;
extern crate time as std_time;
+extern crate tokio;
#[allow(unsafe_code)]
mod heartbeats;
diff --git a/components/profile/time.rs b/components/profile/time.rs
index 780a6e9da2f..e2d12ad5701 100644
--- a/components/profile/time.rs
+++ b/components/profile/time.rs
@@ -23,6 +23,8 @@ use std::io::{self, Write};
use std::path::Path;
use std::time::Duration;
use std_time::precise_time_ns;
+use tokio;
+use tokio::prelude::Future;
use trace_dump::TraceDump;
pub trait Formattable {
@@ -470,9 +472,9 @@ impl Profiler {
if let Some(ref meta) = *meta {
measurement.add_tag("host", meta.url.as_str());
};
- if client.write_one(measurement, None).is_err() {
- warn!("Could not write measurement to profiler db");
- }
+
+ tokio::run(client.write_one(measurement, None)
+ .map_err(|e| warn!("Could not write measurement to profiler db: {:?}", e)));
}
}
},