Group the two traces per compare into one trace.

This commit is contained in:
Tom Alexander 2023-08-14 22:06:22 -04:00
parent a7b298eeec
commit 63d092c83d
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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(())