Sha256: 81bbd908a9d0b9feb1878986de63f868c2f376c43c754d11bead9c591b5d883b

Contents?: true

Size: 917 Bytes

Versions: 5

Compression:

Stored size: 917 Bytes

Contents

# encoding: utf-8
require_relative "../../spec_helper"
require "sinatra"
require "logstash/api/modules/node_stats"
require "logstash/json"

describe LogStash::Api::Modules::NodeStats do
  include Rack::Test::Methods
  extend ResourceDSLMethods

  def app() # Used by Rack::Test::Methods
    described_class
  end

  # DSL describing response structure
  root_structure = {
    "events"=>{
      "in"=>Numeric,
      "filtered"=>Numeric,
      "out"=>Numeric
    },
    "jvm"=>{
      "threads"=>{
        "count"=>Numeric,
        "peak_count"=>Numeric
      }
    },
    "process"=>{
      "peak_open_file_descriptors"=>Numeric,
      "max_file_descriptors"=>Numeric,
      "open_file_descriptors"=>Numeric,
      "mem"=>{
        "total_virtual_in_bytes"=>Numeric
      },
      "cpu"=>{
        "total_in_millis"=>Numeric,
        "percent"=>Numeric
      }
    }
  }

  test_api_and_resources(root_structure)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
logstash-core-5.0.0.alpha4.snapshot1-java spec/api/lib/api/node_stats_spec.rb
logstash-core-5.0.0.alpha3-java spec/api/lib/api/node_stats_spec.rb
logstash-core-5.0.0.alpha3.snapshot8-java spec/api/lib/api/node_stats_spec.rb
logstash-core-5.0.0.alpha3.snapshot7-java spec/api/lib/api/node_stats_spec.rb
logstash-core-5.0.0.alpha3.snapshot6-java spec/api/lib/api/node_stats_spec.rb