Skip to content

Commit

Permalink
Store unadjusted NPS
Browse files Browse the repository at this point in the history
Apply the correction afterwards for datagen game rate
  • Loading branch information
Viren6 committed Aug 17, 2024
1 parent c745cfe commit 826fd05
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/montytest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
according to the route/URL mapping defined in `__init__.py`.
"""

WORKER_VERSION = 12
WORKER_VERSION = 13


@exception_view_config(HTTPException)
Expand Down
2 changes: 1 addition & 1 deletion server/montytest/rundb.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def aggregate_unfinished_runs(self, username=None):
"datagen", False
):
games_per_minute += (
(task["worker_info"]["nps"] / BASELINE_NPS)
((task["worker_info"]["nps"] / 4) / BASELINE_NPS)
* (60.0 / (run["args"]["nodes"] * 137 / BASELINE_NPS))
* (int(task["worker_info"]["concurrency"]))
)
Expand Down
2 changes: 1 addition & 1 deletion server/utils/delta_update_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def compute_games_rates(rundb, info_tuple):
"datagen", False
):
games_per_hour = (
(machine["nps"] / BASELINE_NPS)
((machine["nps"] / 4) / BASELINE_NPS)
* (3600.0 / (machine["run"]["args"]["nodes"] * 137 / BASELINE_NPS))
* (int(machine["concurrency"]))
)
Expand Down
2 changes: 1 addition & 1 deletion worker/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ def run_datagen_games(
threads,
)
tc_factor = BASELINE_NPS / (nps / 4)
result["worker_info"]["nps"] = float(nps / 4)
result["worker_info"]["nps"] = nps
except RunException as e:
run_errors.append(str(e))
except WorkerException as e:
Expand Down
2 changes: 1 addition & 1 deletion worker/sri.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"__version": 12, "updater.py": "gSJX/HbsPwsZnUZaFbAgF0zwWPWXv+LEw9jBhJkxFOrCH9CZS0+4U4nE2fJdeNze", "worker.py": "0fvv6AahgRpu9pjF/xgjdVWjRujuecreJJ9Pyw8yyqfLY8aQ+nhZQlLll4/fWj/k", "games.py": "SOlAX95oLMYwCKNm/XkK5Uf1WPw1PGeIPzvgZqZ04AHNF2+MQ1vc+blTGu5F0JUZ"}
{"__version": 13, "updater.py": "gSJX/HbsPwsZnUZaFbAgF0zwWPWXv+LEw9jBhJkxFOrCH9CZS0+4U4nE2fJdeNze", "worker.py": "uVromGofhQlR48OuE0888er18zXYIl9PC/ZB3KfyXxt2HtGLdPYD/sf4EisgEM1h", "games.py": "s975siTd3V1skmbLJ63EXAHivJp3GLzPtMESJ6G3gBEWolr0/iTCZXHwfGZ5dfL+"}
2 changes: 1 addition & 1 deletion worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
MIN_CARGO_MAJOR = 1
MIN_CARGO_MINOR = 77

WORKER_VERSION = 12
WORKER_VERSION = 13
FILE_LIST = ["updater.py", "worker.py", "games.py"]
HTTP_TIMEOUT = 30.0
INITIAL_RETRY_TIME = 15.0
Expand Down

0 comments on commit 826fd05

Please sign in to comment.