Skip to content
cpbenchy 0.1.0.dev0 is in alpha: until version 1.0, commands, options, the Python API and the result format may still change. Pin the version you use.

inline

Runs inside your own program, to debug plugins step by step.

Updated View as Markdown
ExecutorBuilt incomes with cpbenchy
cpbenchy run instances/ -s ortools -t 60 --executor inline
Version
cpbenchy 0.1.0.dev0
Last updated
6 Oct 2026 · 1 commit
Authors
ThomSerg
Tags
executordebugging

What it does

Runs the worker inside your own process, one run at a time, without limits. Breakpoints in worker plugins work, so it is the way to debug a plugin step by step.

Use it

Implementation

The InlineExecutor in src/cpbenchy/executors.py, lines 228–255 of 305, as of this version of the docs.

src/cpbenchy/executors.pypython
class InlineExecutor(Executor):
    """Runs the worker in this process, one run at a time, without limits: for debugging (breakpoints work)
    and fast tests."""

    name = "inline"

    def start(self, job: WorkerJob) -> "Future[Measurement]":
        future: Future[Measurement] = Future()
        future.set_result(self.execute(job))
        return future

    def execute(self, job: WorkerJob) -> Measurement:
        from cpbenchy.worker.runtime import main

        start, cpu_start = time.monotonic(), time.process_time()
        exitcode = main([str(job.job_file)])
        return Measurement(
            walltime_s=time.monotonic() - start,
            cputime_s=time.process_time() - cpu_start,
            memory_mib=None,
            termination=None,
            exitcode=exitcode,
            executor=self.name,
            reliable=False,
        )


# --- plugin: choosing the executor ---
Navigation

Type to search…

↑↓ navigate↵ selectEsc close