Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: begone 60s "Clean up" time ^_^ #9240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apt-get -yqq update && \
gcc \
git-core \
gosu \
iproute2 \
# Needed for mysqlclient
libmysqlclient-dev \
libpq-dev \
Expand Down
16 changes: 8 additions & 8 deletions toolset/benchmark/benchmarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def __init__(self, config):
self.results = Results(self)
self.docker_helper = DockerHelper(self)

self.last_test = False

##########################################################################################
# Public methods
##########################################################################################
Expand All @@ -61,8 +59,6 @@ def run(self):
with open(os.path.join(self.results.directory, 'benchmark.log'),
'w') as benchmark_log:
for test in self.tests:
if self.tests.index(test) + 1 == len(self.tests):
self.last_test = True
log("Running Test: %s" % test.name, border='-')
with self.config.quiet_out.enable():
if not self.__run_test(test, benchmark_log):
Expand Down Expand Up @@ -98,13 +94,17 @@ def __exit_test(self, success, prefix, file, message=None):
color=Fore.RED if success else '')
self.time_logger.log_test_end(log_prefix=prefix, file=file)
if self.config.mode == "benchmark":
# Sleep for 60 seconds to ensure all host connects are closed
log("Clean up: Sleep 60 seconds...", prefix=prefix, file=file)
time.sleep(60)
total_tcp_sockets = subprocess.check_output("ss -s | grep TCP: | awk '{print $2}'", shell=True, text=True)
log("Total TCP sockets: " + total_tcp_sockets, prefix=prefix, file=file)

if int(total_tcp_sockets) > 5000:
# Sleep for 60 seconds to ensure all host connects are closed
log("Clean up: Sleep 60 seconds...", prefix=prefix, file=file)
time.sleep(60)

# After benchmarks are complete for all test types in this test,
# let's clean up leftover test images (techempower/tfb.test.test-name)
self.docker_helper.clean()

return success

def __run_test(self, test, benchmark_log):
Expand Down
Loading