-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved recovery stats gathering and added R script to process the s…
…tats
- Loading branch information
1 parent
e8bed22
commit ea5658f
Showing
2 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/org/rascalmpl/library/lang/rascal/tests/concrete/recovery/recovery-stats.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# nolint start: line_length_linter. | ||
|
||
options("width" = 60) | ||
|
||
library("fs") | ||
|
||
input <- path_expand("~/stats/benchmark-stats-2024-11-16-0-5120.txt") | ||
raw_data <- read.csv(input, header = TRUE) | ||
|
||
# Select interesting data subsets | ||
recovery_data <- raw_data[raw_data$result == "recovery",] | ||
error_data <- raw_data[raw_data$result == "error", ] | ||
success_data <- raw_data[raw_data$result == "success", ] | ||
|
||
drop <- c("source", "result") | ||
|
||
recovery_fail_data <- recovery_data[recovery_data$errorSize >= recovery_data$size / 4, ] | ||
recovery_ok_data <- recovery_data[recovery_data$errorSize < recovery_data$size / 4, ] | ||
|
||
# Drop uninteresting columns | ||
recovery <- recovery_data[, !(names(recovery_data) %in% drop)] | ||
error <- error_data[, !(names(error_data) %in% drop)] | ||
success <- success_data[, !(names(success_data) %in% drop)] | ||
recovery_fail <- recovery_fail_data[, !(names(recovery_fail_data) %in% drop)] | ||
recovery_ok <- recovery_ok_data[, !(names(recovery_ok_data) %in% drop)] | ||
|
||
print("Total recovery stats") | ||
summary(recovery) | ||
|
||
print("Successful recovery stats (error size < 25% of file size)") | ||
summary(recovery_ok) | ||
|
||
print("Failed recovery stats (error size >= 25% of file size)") | ||
summary(recovery_fail) | ||
|
||
print("Parse error stats") | ||
summary(error) | ||
|
||
print("Successful parse stats") | ||
summary(success) | ||
|
||
# nolint end |