Skip to content

Commit

Permalink
different sets
Browse files Browse the repository at this point in the history
  • Loading branch information
rusefillc committed Nov 12, 2023
1 parent 83d7cc1 commit 8dc7906
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/rusefi/can/analysis/ByteRateOfChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public int getUniqueValuesCount() {
return uniqueValues.size();
}

public HashSet<Integer> getUniqueValues() {
return uniqueValues;
}

public ByteId getKey() {
return key;
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/rusefi/can/analysis/ByteRateOfChangeReports.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ private static void compareTwoReports(String reportDestinationFolder, ByteRateOf
int deltaCount = Math.abs(s1.getUniqueValuesCount() - s2.getUniqueValuesCount());
differences.add(new ByteVariationDifference(deltaCount, msg));
report.println(msg + " delta=" + deltaCount + " / transitions=" + s1.totalTransitions + " vs " + s2.totalTransitions);
} else {
HashSet<Integer> diff = s1.getUniqueValues();
diff.removeAll(s2.getUniqueValues());
if (!diff.isEmpty()) {

report.println(id + " different sets " + s1.getUniqueValues() + " vs " + s2.getUniqueValues());

}


}
}

Expand Down

0 comments on commit 8dc7906

Please sign in to comment.