Package com.ocient.protocol.performance

# Enum Class PerformanceMode

java.lang.Object
java.lang.Enum<PerformanceMode>
com.ocient.protocol.performance.PerformanceMode

All Implemented Interfaces:
  `Serializable`, `Comparable<PerformanceMode>`, `Constable`

public enum PerformanceMode extends Enum<PerformanceMode>
The Performance Mode represents determines how result sets are processed by Ocient Wire clients.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`DATABASE`
Database query execution.
`NETWORK`
Database query execution + client network.
`OFF`
Database query execution + client network + client processing.

## Method Summary

Modifier and Type
Method
Description
`static PerformanceMode`
`get()`
Returns the globally configured `PerformanceMode`.
`static void`
`set(PerformanceMode performanceMode)`
Sets the globally configured `PerformanceMode` for query execution.
`static PerformanceMode`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static PerformanceMode[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### OFF

public static final PerformanceMode OFF
Database query execution + client network + client processing.

Rows are emitted from the database and processed by the client (e.g. printed to stdout).

This is the default mode.

### NETWORK

public static final PerformanceMode NETWORK
Database query execution + client network.

Rows are discarded by the client after wire processing but before the rows are processed (e.g. printed to stdout).

This includes:

1. network link
2. network deserialization
3. wire format deserialization

This mode is useful when the suspected performance bottleneck is client wire processing. Use in conjunction with the client provided metrics to narrow down the culprit.

NOTE: Previously enabled by the `PERFORMANCE ON` command.

### DATABASE

public static final PerformanceMode DATABASE
Database query execution.

Rows are discarded by the database and are not sent to the client, thus, excluding network and client wire processing from the execution stack.

This mode is useful when the suspected performance bottleneck is query execution on the database.

## Method Details

### values

public static PerformanceMode[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static PerformanceMode valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum class has no constant with the specified name
  `NullPointerException` - if the argument is null

### get

public static PerformanceMode get()
Returns the globally configured `PerformanceMode`.

### set

public static void set(PerformanceMode performanceMode)
Sets the globally configured `PerformanceMode` for query execution.

IMPORTANT: this global configuration is NOT to be modified outside of a single threaded context e.g. the CLI runner.