Skip to content

Commit

Permalink
Benchmarking: set process priority
Browse files Browse the repository at this point in the history
  • Loading branch information
shBLOCK committed Apr 5, 2024
1 parent d4311ab commit 39d5ce2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions benchmark/benchmark.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import sys
import timeit
import enum
from collections import OrderedDict
from numerize.numerize import numerize

# Get rid of pygame import message
import pygame

import platform
if platform.system() == "Windows":
import psutil
import os
psutil.Process(os.getpid()).nice(psutil.REALTIME_PRIORITY_CLASS)
print("Setting process priority to realtime class!")
else:
print("Warning: Not on windows, not setting process priority!", file=sys.stderr)

print()

class Subject(enum.Enum):
Expand Down

0 comments on commit 39d5ce2

Please sign in to comment.