Enum PerformanceMode

java.lang.Object
java.lang.Enum<PerformanceMode>
com.ocient.protocol.PerformanceMode
All Implemented Interfaces:
Serializable, Comparable<PerformanceMode>, java.lang.constant.Constable

public enum PerformanceMode
extends Enum<PerformanceMode>
The Performance Mode represents determines how result sets are processed by Ocient Wire clients.
  • 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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PerformanceMode valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.