org.apache.jmeter.visualizers.backend.influxdb

## Class InfluxdbBackendListenerClient

- java.lang.Object
- - org.apache.jmeter.visualizers.backend.AbstractBackendListenerClient
  - - org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient

- All Implemented Interfaces:
    java.lang.Runnable, BackendListenerClient

      public class InfluxdbBackendListenerClient
      extends AbstractBackendListenerClient
      implements java.lang.Runnable

  Implementation of `AbstractBackendListenerClient` to write in an InfluxDB using custom schema
  Since:
    3.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InfluxdbBackendListenerClient()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Arguments` | `getDefaultParameters()` Provide a list of parameters which this test supports.
    `protected SamplerMetric` | `getSamplerMetricInfluxdb(java.lang.String sampleLabel)`
    `java.lang.String` | `getSamplersRegex()`
    `void` | `handleSampleResults(java.util.List<SampleResult> sampleResults, BackendListenerContext context)` Handle sampleResults, this can be done in many ways: Write to a file Write to a distant server ...
    `void` | `run()`
    `protected void` | `sendMetrics()` Send metrics
    `void` | `setSamplersList(java.lang.String samplersList)`
    `void` | `setupTest(BackendListenerContext context)` Do any initialization required by this client.
    `void` | `teardownTest(BackendListenerContext context)` Do any clean-up required at the end of a test run.

    - ### Methods inherited from class org.apache.jmeter.visualizers.backend.AbstractBackendListenerClient

      `createSampleResult, getLogger, getMetricsPerSampler, getNewLogger, getSamplerMetric, getUserMetrics`

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

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

- - ### Constructor Detail

    - #### InfluxdbBackendListenerClient

          public InfluxdbBackendListenerClient()

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### sendMetrics

          protected void sendMetrics()

      Send metrics

    - #### getSamplersRegex

          public java.lang.String getSamplersRegex()

      Returns:
        the samplersList

    - #### setSamplersList

          public void setSamplersList(java.lang.String samplersList)

      Parameters:
        `samplersList` - the samplersList to set

    - #### handleSampleResults

          public void handleSampleResults(java.util.List<SampleResult> sampleResults,
                                          BackendListenerContext context)

      Description copied from interface: `BackendListenerClient`
      Handle sampleResults, this can be done in many ways:
      - Write to a file
      - Write to a distant server
      - ...
      Specified by:
        `handleSampleResults` in interface `BackendListenerClient`
      Parameters:
        `sampleResults` - List of `SampleResult`
        `context` - the context to run with. This provides access to initialization parameters.

    - #### setupTest

          public void setupTest(BackendListenerContext context)
                         throws java.lang.Exception

      Description copied from interface: `BackendListenerClient`
      Do any initialization required by this client. It is generally recommended to do any initialization such as getting parameter values in the setupTest method rather than the runTest method in order to add as little overhead as possible to the test.
      Specified by:
        `setupTest` in interface `BackendListenerClient`
      Overrides:
        `setupTest` in class `AbstractBackendListenerClient`
      Parameters:
        `context` - the context to run with. This provides access to initialization parameters. Context is readonly
      Throws:
        `java.lang.Exception` - when setup fails

    - #### getSamplerMetricInfluxdb

          protected SamplerMetric getSamplerMetricInfluxdb(java.lang.String sampleLabel)

    - #### teardownTest

          public void teardownTest(BackendListenerContext context)
                            throws java.lang.Exception

      Description copied from interface: `BackendListenerClient`
      Do any clean-up required at the end of a test run.
      Specified by:
        `teardownTest` in interface `BackendListenerClient`
      Overrides:
        `teardownTest` in class `AbstractBackendListenerClient`
      Parameters:
        `context` - the context to run with. This provides access to initialization parameters.
      Throws:
        `java.lang.Exception` - when tear down fails

    - #### getDefaultParameters

          public Arguments getDefaultParameters()

      Description copied from interface: `BackendListenerClient`
      Provide a list of parameters which this test supports. Any parameter names and associated values returned by this method will appear in the GUI by default so the user doesn't have to remember the exact names. The user can add other parameters which are not listed here. If this method returns null then no parameters will be listed. If the value for some parameter is null then that parameter will be listed in the GUI with an empty value.
      Specified by:
        `getDefaultParameters` in interface `BackendListenerClient`
      Overrides:
        `getDefaultParameters` in class `AbstractBackendListenerClient`
      Returns:
        a specification of the parameters used by this test which should be listed in the GUI, or null if no parameters should be listed.

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.