How to add an operator to the benchmark list


SNAP provides a tool to compute the best settings for a given operator, from SNAP (menu Tools/Options/Performance) or by directly launching the snap-conf-optimiser executable. snap-engine comes with a basic list of compatible operators that can be extended. This page explains how to add an operator to this list.


To add an operator or a list of operator to the list of benchmark operators:

  1. Write a BenchmarkOperatorProvider

    Extends the and implement the getBenchmarkOperatorAliases() method, which gives the list of operator aliases to be added the the benchmarkable operator list.

    Example for snap-engine operators
    public class SNAPEngineBenchmarkOperatorProvider extends BenchmarkOperatorProvider {
        protected List<String> getBenchmarkOperatorAliases() {
            String[] snapEngineBenchmarkOperatorNames = {"Import-Vector", "Flip", "PassThrough", "Reproject", "WriteRGB", "Convert-Datatype", "Write"};
            return Arrays.asList(snapEngineBenchmarkOperatorNames);

  2. Declare the BenchmarkOperatorProvider

    Create a file in the resources/META-INF/services folder or your project

    Example of Benchmark operator list extension declaration

Production Code Samples

Source code and example of extension can be found in the smart-configurator project:

Further Info