Skip to content

Commit

Permalink
[GR-53489] Stop the MaxRssCopyRule from rerunning
Browse files Browse the repository at this point in the history
PullRequest: mx/1788
  • Loading branch information
Andrija Kolic committed Apr 18, 2024
2 parents 9858574 + 8019a4d commit 8215510
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18149,7 +18149,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.22.5") # Support .cpp and .hpp in DefaultNinjaProject
version = VersionSpec("7.22.6") # Stop MaxRssCopyRule of the rsspercentiles tracker from rerunning

_mx_start_datetime = datetime.utcnow()

Expand Down
13 changes: 12 additions & 1 deletion src/mx/_impl/mx_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,10 @@ def getCSVFiles(self, text):
return [file] if file else []

def parseResults(self, text):
if self.tracker.most_recent_text_output is None:
mx.log("\tRSS percentile data points have already been parsed.")
return []

rows = super().parseResults(text)

temp_text_output = self.tracker.most_recent_text_output
Expand Down Expand Up @@ -3022,7 +3026,14 @@ def __init__(self, tracker, bmSuiteArgs):
self.tracker = tracker

def parseResults(self, text):
for rss_dp in self.tracker.percentile_data_points:
if not self.tracker.percentile_data_points:
mx.log("\tmax-rss data point has already been parsed.")
return []

data_points = self.tracker.percentile_data_points
self.tracker.percentile_data_points = []

for rss_dp in data_points:
if rss_dp['metric_percentile'] == str(RssPercentilesTracker.MaxRssCopyRule.percentile_to_copy_into_max_rss):
mx.log(f"\n\tmax-rss copied from {rss_dp['metric_percentile']}th RSS percentile (MB): {rss_dp['metric_value']}")
return [{"metric_value": rss_dp['metric_value']}]
Expand Down

0 comments on commit 8215510

Please sign in to comment.