Skip to content

Commit

Permalink
Use the same thread count method as the agent uses
Browse files Browse the repository at this point in the history
and back to 5 minute wait on the test, maybe we can reduce this further?
Issue #330
  • Loading branch information
damies13 committed Jan 4, 2025
1 parent 2a8c56f commit a9db303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/Regression/Manager/CommandLine_Bugs.robot
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Lots Of Resource Files
Log to console ${CURDIR}
${scenariofile}= Normalize Path ${testdata}${/}scenario.rfs
Log to console ${scenariofile}
@{time}= Get Time hour min sec NOW + 10min
@{time}= Get Time hour min sec NOW + 5 min
@{mngr_options}= Create List -i ${testdata}${/}manager.ini -n -d ${results_dir} -t ${time[0]}:${time[1]}:${time[2]}
Run Manager CLI ${mngr_options}
# It can take a while for the agent to download 3500+ files
Expand Down
5 changes: 4 additions & 1 deletion rfswarm_manager/rfswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ class RFSwarmBase:
MetricIDs: Any = {}
scriptfilters = [""]

corecount = psutil.cpu_count()
threadcount = corecount * 32

# #000000 = Black
# https://www.schemecolor.com/traffic-red-yellow-green.php
defcolours = ['#000000', '#008450', '#B81D13', '#EFB700', '#888888']
Expand Down Expand Up @@ -1469,7 +1472,7 @@ def find_dependancies(self, hash):
t.start()

base.debugmsg(0, "threading active count:", threading.active_count())
while threading.active_count() > 50:
while threading.active_count() > self.threadcount:
base.debugmsg(0, "threading active count:", threading.active_count())
time.sleep(0.1)

Expand Down

0 comments on commit a9db303

Please sign in to comment.