Skip to content

Commit

Permalink
Merge pull request #1108 from ricffb/add-benchcloud-containerImage-arg
Browse files Browse the repository at this point in the history
Add the containerImage CLI arg to the BenchCloud Executor
  • Loading branch information
PhilippWendler authored Nov 15, 2024
2 parents cbc5784 + bf9fe2c commit 78a58ca
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/vcloud/benchmarkclient_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
#
# SPDX-License-Identifier: Apache-2.0

import sys
import json
import logging
import os
import shutil
import subprocess
import sys

import benchexec.tooladapter
import benchexec.util

from . import vcloudutil

sys.dont_write_bytecode = True # prevent creation of .pyc files
Expand Down Expand Up @@ -108,8 +110,8 @@ def execute_benchmark(benchmark, output_handler):
cmdLine.extend(["--try-less-memory", str(benchmark.config.tryLessMemory)])
if benchmark.config.debug:
cmdLine.extend(["--print-new-files", "true"])

start_time = benchexec.util.read_local_time()
if benchmark.config.containerImage:
cmdLine.extend(["--containerImage", str(benchmark.config.containerImage)])

cloud = subprocess.Popen(
cmdLine,
Expand Down
8 changes: 8 additions & 0 deletions contrib/vcloud/vcloudbenchmarkbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def add_vcloud_args(self, vcloud_args):
action="store_true",
help="Prevents ivy from caching the downloaded jar files. This prevents clashes due to concurrent access to the cache.",
)
vcloud_args.add_argument(
self.get_param_name("cloudContainerImage"),
dest="containerImage",
metavar="IMAGE",
action="store",
type=str,
help="Use the specified container image for the execution of the benchmark.",
)

def get_param_name(self, pname):
return "--v" + pname
Expand Down

0 comments on commit 78a58ca

Please sign in to comment.