Lint cleanup when prometheus not enabled.
This commit is contained in:
parent
051482e7fe
commit
5d5f3c7244
@ -8,13 +8,13 @@ extern crate rtiow;
|
||||
extern crate stderrlog;
|
||||
extern crate structopt;
|
||||
#[macro_use]
|
||||
#[cfg(feature = "prom")]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
#[cfg(feature = "prom")]
|
||||
extern crate prometheus;
|
||||
|
||||
use std::fs;
|
||||
use std::time::Instant;
|
||||
|
||||
use chrono::DateTime;
|
||||
use chrono::Utc;
|
||||
@ -46,7 +46,7 @@ fn push_metrics(_push_gateway_addr: &str, _instance: String, start_time: &DateTi
|
||||
|
||||
#[cfg(feature = "prom")]
|
||||
fn push_metrics(push_gateway_addr: &str, instance: String, start_time: &DateTime<Utc>) {
|
||||
let runtime = start_instant.elapsed();
|
||||
let runtime = (Utc::now() - *start_time).to_std().unwrap();
|
||||
info!(
|
||||
"Render time {}.{} seconds",
|
||||
runtime.as_secs(),
|
||||
@ -117,7 +117,6 @@ fn main() -> Result<(), std::io::Error> {
|
||||
.init()
|
||||
.unwrap();
|
||||
let start_time: DateTime<Utc> = Utc::now();
|
||||
let start_instant = Instant::now();
|
||||
let opt = Opt::from_args();
|
||||
let scene = opt.model.scene(&opt);
|
||||
fs::create_dir_all(&opt.output)?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user