Device detection services for 51Degrees Pipeline

fiftyone.devicedetection.examples.console.PerformanceBenchmark Class Reference

Detailed Description

The example illustrates the flexibility with which the 51Degrees pipeline can be configured to achieve a range of outcomes relating to speed, accuracy, predictive power, memory usage.

Please see performance options) and hash dataset options for more information about adjusting performance.

Collaboration diagram for fiftyone.devicedetection.examples.console.PerformanceBenchmark:

[legend]

Classes

class  BenchmarkResult
class  PerformanceConfiguration

Static Public Member Functions

static void main (String[] args) throws Exception

Static Public Attributes

static final int DEFAULT_NUMBER_OF_THREADS = 4
static final int TESTS_PER_THREAD = 10000
static final Logger logger = LoggerFactory.getLogger(PerformanceBenchmark.class)
static PerformanceConfiguration[] DEFAULT_PERFORMANCE_CONFIGURATIONS

Protected Member Functions

void runBenchmarks (PerformanceConfiguration[] performanceConfigurations, String dataFilename, String evidenceFilename, int numberOfThreads, PrintWriter writer) throws Exception
 Runs benchmarks for various configurations.

Member Function Documentation

◆ runBenchmarks()

void fiftyone.devicedetection.examples.console.PerformanceBenchmark.runBenchmarks ( PerformanceConfiguration[] performanceConfigurations,
String dataFilename,
String evidenceFilename,
int numberOfThreads,
PrintWriter writer ) throws Exception
protected

Runs benchmarks for various configurations.

Parameters
dataFilenamepath to the 51Degrees device data file for testing
evidenceFilenamepath to a text file of evidence
numberOfThreadsnumber of concurrent threads
Exceptions
Exceptionas a catch all
Examples
PerformanceBenchmark.java.

Member Data Documentation

◆ DEFAULT_PERFORMANCE_CONFIGURATIONS

PerformanceConfiguration [] fiftyone.devicedetection.examples.console.PerformanceBenchmark.DEFAULT_PERFORMANCE_CONFIGURATIONS
static
Initial value:
= {
new PerformanceConfiguration(MaxPerformance, false, false, true),
new PerformanceConfiguration(MaxPerformance, false, true, false),
new PerformanceConfiguration(MaxPerformance, true, true, false)
}