class Zold::Routines::Audit
Audit
and report as much as we can to the command line.
- Author
-
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
-
Copyright © 2018 Yegor Bugayenko
- License
-
MIT
Public Class Methods
new(opts, wallets, log: Log::NULL)
click to toggle source
# File lib/zold/commands/routines/audit.rb, line 32 def initialize(opts, wallets, log: Log::NULL) @opts = opts @wallets = wallets @log = log end
Public Instance Methods
exec(_ = 0)
click to toggle source
# File lib/zold/commands/routines/audit.rb, line 38 def exec(_ = 0) sleep(60) unless @opts['routine-immediately'] @log.info( 'Audit: ' + [ "memory used: #{Zold::Size.new(GetProcessMem.new.bytes.to_i)}", "threads total: #{Thread.list.count}", "wallets: #{@wallets.count}" ].join('; ') ) end