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: Write a BenchmarkOperatorProvider Declare the BenchmarkOperatorProvider Source code and example of extension can be found in the smart-configurator project: https://github.com/senbox-org/snap-engine/tree/master/snap-smart-configurator N/A Introduction
Content
Extends the org.esa.snap.smart.configurator.BenchmarkOperatorProvider and implement the getBenchmarkOperatorAliases() method, which gives the list of operator aliases to be added the the benchmarkable operator list.public class SNAPEngineBenchmarkOperatorProvider extends BenchmarkOperatorProvider {
@Override
protected List<String> getBenchmarkOperatorAliases() {
String[] snapEngineBenchmarkOperatorNames = {"Import-Vector", "Flip", "PassThrough", "Reproject", "WriteRGB", "Convert-Datatype", "Write"};
return Arrays.asList(snapEngineBenchmarkOperatorNames);
}
}
Create a org.esa.snap.smart.configurator.BenchmarkOperatorProvider file in the resources/META-INF/services folder or your projectorg.esa.snap.smart.configurator.SNAPEngineBenchmarkOperatorProvider
Production Code Samples
Further Info