Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hkctkuy committed Nov 3, 2023
1 parent 2e86a4a commit 71daa1f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions casr/src/bin/casr-cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <INPUT_DIR> <OUTPUT_DIR>
Deduplicate CASR reports. If two directories are set, deduplicated reports are
copied to the second directory. If one directory is provided, duplicated reports
Expand Down
4 changes: 2 additions & 2 deletions libcasr/src/stacktrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ pub fn cluster_stacktraces(stacktraces: &[Stacktrace]) -> Result<Vec<usize>> {
}

/// 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
///
Expand All @@ -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<HashSet<String>> = 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() {
Expand Down

0 comments on commit 71daa1f

Please sign in to comment.