//clika-runtime/io.clika.modelverse/Modelverse/bench
bench
[common]
fun bench(model: GenerativeModel, options: BenchOptions = BenchOptions()): BenchReport
The serving-path benchmark over a loaded model, the command line's bench verb in process: options' cells times its concurrency widths, one (cell, width) at a time through the serving pipeline over the model, answered as a BenchReport (the rows typed, the CSV text the verb prints, the run's configuration document). The call blocks for the sweep, minutes for the command line's default cells on a phone; a chat sent to the model meanwhile waits behind it, and a close() of the model waits for the sweep to end (the sweep has no cancel). A setup failure (a closed model, an option the library refuses) throws ModelverseException; a cell the model's window cannot fit is a BenchRowStatus.SKIPPED row and a failed row a BenchRowStatus.ERROR row, never an exception. The measurement runs on the device the model loaded on; the configuration document names it.