com.h3c.util.perf.controller

## Class PerfConfig

- java.lang.Object
- - com.h3c.util.perf.controller.PerfConfig

-     public class PerfConfig
      extends Object

  A configuration singleton for performance-related instrumentation.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `short` | `getProfile()` Get the configured profile.
    `void` | `init(Properties config)` This method should get called at service initialization.
    `static PerfConfig` | `instance()` Get the singleton instance.
    `boolean` | `isEnabled(short annotatedProfile)` See if metric is enabled for the given profile.
    `void` | `setProfile(short profile)` Set the profile for performance measurement.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### instance

          public static PerfConfig instance()

      Get the singleton instance.
      Returns:
        singleton instance

    - #### init

          public void init(Properties config)

      This method should get called at service initialization.
      Parameters:
        `config` - custom configurations

    - #### isEnabled

          public boolean isEnabled(short annotatedProfile)

      See if metric is enabled for the given profile.
      Parameters:
        `annotatedProfile` - Profile
      Returns:
        true if enabled, false otherwise.

    - #### setProfile

          public void setProfile(short profile)

      Set the profile for performance measurement.
      Parameters:
        `profile` - a Profile value

    - #### getProfile

          public short getProfile()

      Get the configured profile.
      Returns:
        a Profile value

Copyright © 2014. All Rights Reserved.