mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-02-26 12:59:17 -05:00
fix bench --features=nightly, broken by upgrade
The benchmarks don't get compiled with the standard "cargo test"; they require "cargo +nightly bench --features=nightly", so I didn't notice they were broken in the previous commit. Now fixed.
This commit is contained in:
parent
bebd6ee79a
commit
ac43e7fe17
@ -1780,6 +1780,7 @@ mod bench {
|
|||||||
use std::str;
|
use std::str;
|
||||||
use super::tests::create_mp4_from_db;
|
use super::tests::create_mp4_from_db;
|
||||||
use testutil::{self, TestDb};
|
use testutil::{self, TestDb};
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
/// An HTTP server for benchmarking.
|
/// An HTTP server for benchmarking.
|
||||||
/// It's used as a singleton via `lazy_static!` so that when getting a CPU profile of the
|
/// It's used as a singleton via `lazy_static!` so that when getting a CPU profile of the
|
||||||
@ -1789,7 +1790,7 @@ mod bench {
|
|||||||
/// different scenarios: with/without subtitles and edit lists, different lengths, serving
|
/// different scenarios: with/without subtitles and edit lists, different lengths, serving
|
||||||
/// different fractions of the file, etc.
|
/// different fractions of the file, etc.
|
||||||
struct BenchServer {
|
struct BenchServer {
|
||||||
url: hyper::Url,
|
url: Url,
|
||||||
generated_len: u64,
|
generated_len: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1810,7 +1811,7 @@ mod bench {
|
|||||||
});
|
});
|
||||||
let addr = rx.recv().unwrap();
|
let addr = rx.recv().unwrap();
|
||||||
BenchServer{
|
BenchServer{
|
||||||
url: hyper::Url::parse(&format!("http://{}:{}/", addr.ip(), addr.port())).unwrap(),
|
url: Url::parse(&format!("http://{}:{}/", addr.ip(), addr.port())).unwrap(),
|
||||||
generated_len: p,
|
generated_len: p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user