xk6-client-prometheus-remote
    Preparing search index...

    Function Sample

    • Creates a Sample object.

      This constructor function creates a sample (data point) with a value and timestamp.

      Parameters

      • value: number

        The numeric value of the sample

      • timestamp: number

        Timestamp in milliseconds

      Returns Sample

      A Sample object

      import remote from 'k6/x/remotewrite';

      const sample1 = remote.Sample(42, Date.now());
      const sample2 = remote.Sample(100.5, 1643235433000);