Class InfluxDbBackendListener

    • Field Detail

      • title

        protected String title
      • token

        protected String token
      • samplersRegex

        protected String samplersRegex
      • measurement

        protected String measurement
      • applicationName

        protected String applicationName
      • percentiles

        protected String percentiles
    • Constructor Detail

      • InfluxDbBackendListener

        public InfluxDbBackendListener​(String url)
    • Method Detail

      • token

        public InfluxDbBackendListener token​(String token)
        Allows specifying a token for authentication with InfluxDB 2 instances.

        Check InfluxDB documentation for more details.

        Parameters:
        token - to use to authenticate to InfluxDB
        Returns:
        the listener for further configuration or usage.
      • title

        public InfluxDbBackendListener title​(String title)
        Allows setting a title for the test which will be included in started and ended annotations in "events" measurement.

        Consider setting this value to something that properly describes your application and the particular test run (some timestamp, some CI/CD build ID, some commit ID, etc.).

        When not specified, this will default to "jmeter-java-dsl" plus the current timestamp.

        Parameters:
        title - to be included in started and ended annotations.
        Returns:
        the listener for further configuration or usage.
      • application

        public InfluxDbBackendListener application​(String applicationName)
        Allows specifying an application name tag to be included with collected metrics.

        This name can later be used to identify tests generated by this application on a given measurement, from other applications.

        Parameters:
        applicationName - specifies the name of the application tag.
        Returns:
        the listener for further configuration or usage.
        Since:
        0.38
      • measurement

        public InfluxDbBackendListener measurement​(String measurement)
        Allows specifying the name of the measurement that contains collected metrics sent to InfluxDB.
        Parameters:
        measurement - specifies the name of the measurement.
        Returns:
        the listener for further configuration or usage.
        Since:
        0.38
      • samplersRegex

        public InfluxDbBackendListener samplersRegex​(String samplersRegex)
        Allows specifying a regular expression used to filter collected metrics.

        This regular expression is applied to sample labels, and when matched, collected sample metrics will be sent to InfluxDB. Otherwise, they will be ignored.

        For example ^[^_].*" - will exclude samplers which labels start with symbol "_".

        Parameters:
        samplersRegex - specifies the name of the samplersRegex.
        Returns:
        the listener for further configuration or usage.
        Since:
        0.38
      • tag

        public InfluxDbBackendListener tag​(String name,
                                           String value)
        Allows adding tags to be included with every measurement sent to InfluxDB.
        Parameters:
        name - specifies the name of the tag. Take into consideration that, in contrast to JMeter GUI, no
        TAG_
        prefix should be included.
        value - specifies the value of the tag.
        Returns:
        the listener for further configuration or usage.
      • percentiles

        public InfluxDbBackendListener percentiles​(float... percentiles)
        Allows specifying a list of percentiles that will be calculated and sent to InfluxDb.
        Parameters:
        percentiles - specifies a list of percentiles as float values.
        Returns:
        the listener for further configuration or usage.
        Since:
        1.24