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 stderrlog;
|
||||||
extern crate structopt;
|
extern crate structopt;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
#[cfg(feature = "prom")]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
#[cfg(feature = "prom")]
|
#[cfg(feature = "prom")]
|
||||||
extern crate prometheus;
|
extern crate prometheus;
|
||||||
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::time::Instant;
|
|
||||||
|
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
@ -46,7 +46,7 @@ fn push_metrics(_push_gateway_addr: &str, _instance: String, start_time: &DateTi
|
|||||||
|
|
||||||
#[cfg(feature = "prom")]
|
#[cfg(feature = "prom")]
|
||||||
fn push_metrics(push_gateway_addr: &str, instance: String, start_time: &DateTime<Utc>) {
|
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!(
|
info!(
|
||||||
"Render time {}.{} seconds",
|
"Render time {}.{} seconds",
|
||||||
runtime.as_secs(),
|
runtime.as_secs(),
|
||||||
@ -117,7 +117,6 @@ fn main() -> Result<(), std::io::Error> {
|
|||||||
.init()
|
.init()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let start_time: DateTime<Utc> = Utc::now();
|
let start_time: DateTime<Utc> = Utc::now();
|
||||||
let start_instant = Instant::now();
|
|
||||||
let opt = Opt::from_args();
|
let opt = Opt::from_args();
|
||||||
let scene = opt.model.scene(&opt);
|
let scene = opt.model.scene(&opt);
|
||||||
fs::create_dir_all(&opt.output)?;
|
fs::create_dir_all(&opt.output)?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user