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;
|
use organic::emacs_parse_org_document;
|
||||||
#[cfg(feature = "compare")]
|
#[cfg(feature = "compare")]
|
||||||
use organic::parser::sexp::sexp_with_padding;
|
use organic::parser::sexp::sexp_with_padding;
|
||||||
|
use tracing::span;
|
||||||
|
|
||||||
use crate::init_tracing::init_telemetry;
|
use crate::init_tracing::init_telemetry;
|
||||||
use crate::init_tracing::shutdown_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>> {
|
fn main_body() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
init_telemetry()?;
|
init_telemetry()?;
|
||||||
let compare_result = run_compare(
|
let compare_result = {
|
||||||
std::env::args()
|
#[cfg(feature = "tracing")]
|
||||||
.nth(1)
|
let span = span!(tracing::Level::DEBUG, "run_compare");
|
||||||
.expect("Pass a single file into this script."),
|
#[cfg(feature = "tracing")]
|
||||||
);
|
let _enter = span.enter();
|
||||||
|
|
||||||
|
run_compare(
|
||||||
|
std::env::args()
|
||||||
|
.nth(1)
|
||||||
|
.expect("Pass a single file into this script."),
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
shutdown_telemetry()?;
|
shutdown_telemetry()?;
|
||||||
compare_result?;
|
compare_result?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user