IntroductionSNAP 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. ContentTo add an operator or a list of operator to the list of benchmark operators: Write a BenchmarkOperatorProvider
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.
Code Block |
---|
language | java |
---|
title | Example for snap-engine operators |
---|
| 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);
}
} |
Declare the BenchmarkOperatorProvider
Create a org.esa.snap.smart.configurator.BenchmarkOperatorProvider file in the resources/META-INF/services folder or your project
Code Block |
---|
title | Example of Benchmark operator list extension declaration |
---|
| org.esa.snap.smart.configurator.SNAPEngineBenchmarkOperatorProvider |
Production Code SamplesSource 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 Further InfoN/A |