From 71daa1f1b69609b1d3a1b56588d2fa8c720d96af Mon Sep 17 00:00:00 2001 From: hkctkuy Date: Fri, 3 Nov 2023 18:00:52 +0300 Subject: [PATCH] Fixes --- casr/src/bin/casr-cluster.rs | 6 +++--- docs/usage.md | 5 +++-- libcasr/src/stacktrace.rs | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/casr/src/bin/casr-cluster.rs b/casr/src/bin/casr-cluster.rs index b5d086fc..2608e95e 100644 --- a/casr/src/bin/casr-cluster.rs +++ b/casr/src/bin/casr-cluster.rs @@ -377,12 +377,12 @@ fn main() -> Result<()> { ), ) .arg( - Arg::new("cluster-unique-crashline") - .long("cluster-unique-crashline") + Arg::new("unique-crashline") + .long("unique-crashline") .env("CASR_CLUSTER_UNIQUE_CRASHLINE") .action(ArgAction::SetTrue) .value_parser(FalseyValueParser::new()) - .help("Deduplicate each cluster by crashline") + .help("Leave reports with unique crash lines in each cluster") ) .arg( Arg::new("deduplication") diff --git a/docs/usage.md b/docs/usage.md index 326654d1..f15bce55 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -224,8 +224,9 @@ Tool for clustering CASR reports Cluster CASR reports. If two directories are set, clusters will be placed in the second directory. If one directory is provided, clusters will be placed there, but reports in this directory will not be deleted. - --cluster-unique-crashline - Deduplicate each cluster by crashline [env: CASR_CLUSTER_UNIQUE_CRASHLINE=] + --unique-crashline + Leave reports with unique crash lines in each cluster [env: + CASR_CLUSTER_UNIQUE_CRASHLINE=] -d, --deduplicate Deduplicate CASR reports. If two directories are set, deduplicated reports are copied to the second directory. If one directory is provided, duplicated reports diff --git a/libcasr/src/stacktrace.rs b/libcasr/src/stacktrace.rs index eeebc1d2..54cdb97e 100644 --- a/libcasr/src/stacktrace.rs +++ b/libcasr/src/stacktrace.rs @@ -251,7 +251,7 @@ pub fn cluster_stacktraces(stacktraces: &[Stacktrace]) -> Result> { } /// Perform crashline deduplication for each cluster: -/// Reset Vec\[i\] to 0 if asrep crashline is duplicate of some other. +/// Reset Vec\[i\] to 0 if report crashline is duplicate of some other. /// /// # Arguments /// @@ -273,7 +273,7 @@ pub fn dedup_crashlines(crashlines: &[String], clusters: &mut [usize]) -> usize // Init dedup crashline list for each cluster let mut unique_crashlines: Vec> = vec![HashSet::new(); cluster_num]; - // Init unique crashline counter, e.i. left casrep + // Init unique crashline counter, e.i. left casreps let mut unique_cnt = 0; // Dedup reports by crashline for (i, crashline) in crashlines.iter().enumerate() {