Class: Datadog::Core::DDSketch

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/ddsketch.rb,
ext/libdatadog_api/ddsketch.c

Overview

Used to access ddsketch APIs. APIs in this class are implemented as native code.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDDSketch

Returns a new instance of DDSketch.



14
15
16
17
18
# File 'lib/datadog/core/ddsketch.rb', line 14

def initialize
  unless self.class.supported?
    raise(ArgumentError, "DDSketch is not supported: #{Datadog::Core::LIBDATADOG_API_FAILURE}")
  end
end

Class Method Details

.supported?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/datadog/core/ddsketch.rb', line 10

def self.supported?
  Datadog::Core::LIBDATADOG_API_FAILURE.nil?
end

Instance Method Details

#addObject



8
# File 'ext/libdatadog_api/ddsketch.c', line 8

static VALUE native_add(VALUE self, VALUE point);

#add_with_countObject



9
# File 'ext/libdatadog_api/ddsketch.c', line 9

static VALUE native_add_with_count(VALUE self, VALUE point, VALUE count);

#countObject



10
# File 'ext/libdatadog_api/ddsketch.c', line 10

static VALUE native_count(VALUE self);

#encodeObject



11
# File 'ext/libdatadog_api/ddsketch.c', line 11

static VALUE native_encode(VALUE self);