Class: Dtn::Messages::System::Stats

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/system/stats.rb

Overview

All stats

Class Method Summary collapse

Methods inherited from MessageWithSimpleParser

parse, #termination?

Methods inherited from Dtn::Message

#callback_name, callback_name, parse

Class Method Details

.fieldsObject

rubocop:disable Metrics/MethodLength



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/dtn/messages/system/stats.rb', line 10

def fields
  @fields ||= {
    server_ip: :to_s,
    server_port: :to_i,
    max_symbols: :to_i,
    number_of_symbols: :to_i,
    clients_connected: :to_i,
    seconds_since_last_update: :to_i,
    reconnections: :to_i,
    attemptedReconnections: :to_i,
    start_time: :to_datetime,
    market_time: :to_datetime,
    status: :to_s,
    iq_feed_version: :to_s,
    loginId: :to_s,
    totalKBsRecv: :to_f,
    kbsPerSecRecv: :to_f,
    avgKBsPerSecRecv: :to_f,
    totalKBsSent: :to_f,
    kbsPerSecSent: :to_f,
    avgKBsPerSecSent: :to_f
  }
end