Group the two traces per compare into one trace.
This commit is contained in:
parent
a7b298eeec
commit
63d092c83d
19
src/main.rs
19
src/main.rs
@ -9,6 +9,7 @@ use organic::compare_document;
|
||||
use organic::emacs_parse_org_document;
|
||||
#[cfg(feature = "compare")]
|
||||
use organic::parser::sexp::sexp_with_padding;
|
||||
use tracing::span;
|
||||
|
||||
use crate::init_tracing::init_telemetry;
|
||||
use crate::init_tracing::shutdown_telemetry;
|
||||
@ -28,11 +29,19 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
fn main_body() -> Result<(), Box<dyn std::error::Error>> {
|
||||
init_telemetry()?;
|
||||
let compare_result = run_compare(
|
||||
std::env::args()
|
||||
.nth(1)
|
||||
.expect("Pass a single file into this script."),
|
||||
);
|
||||
let compare_result = {
|
||||
#[cfg(feature = "tracing")]
|
||||
let span = span!(tracing::Level::DEBUG, "run_compare");
|
||||
#[cfg(feature = "tracing")]
|
||||
let _enter = span.enter();
|
||||
|
||||
run_compare(
|
||||
std::env::args()
|
||||
.nth(1)
|
||||
.expect("Pass a single file into this script."),
|
||||
)
|
||||
};
|
||||
|
||||
shutdown_telemetry()?;
|
||||
compare_result?;
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user