Skip to content

Commit

Permalink
Exclude Classes By Percent
Browse files Browse the repository at this point in the history
Summary:
https://fb.workplace.com/groups/2873758662935731/permalink/3401389683505957/

This change enables exclusion by percent instead of using a unified threshold, it also distinguishs beta data from production data.

Reviewed By: NTillmann

Differential Revision: D48354184

fbshipit-source-id: 5c19f67e0986824104d4bfcbd6e2610c24a1538b
  • Loading branch information
Jidong Chen authored and facebook-github-bot committed Sep 6, 2023
1 parent 52157df commit 61664f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libredex/ConfigFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ void ConfigFiles::build_dead_class_and_live_class_split_lists() {
if (splitter.next()) {
str = splitter.get();
from_chars(str, &load_counts.unsampled);
if (splitter.next()) {
str = splitter.get();
from_chars(str, &load_counts.beta_unsampled);
}
}
}
bool is_relocated = is_relocated_class(classname);
Expand Down
1 change: 1 addition & 0 deletions libredex/ConfigFiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ struct ConfigFiles {
struct DeadClassLoadCounts {
int64_t sampled{50}; // legacy
int64_t unsampled{0};
int64_t beta_unsampled{0}; // Whether is beta sample or not
};

const std::unordered_map<std::string, DeadClassLoadCounts>&
Expand Down

0 comments on commit 61664f4

Please sign in to comment.