403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.128.173.53
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/wall_clock.rb
require_relative '../../../puppet/util/profiler/logging'

# A profiler implementation that measures the number of seconds a segment of
# code takes to execute and provides a callback with a string representation of
# the profiling information.
#
# @api private
class Puppet::Util::Profiler::WallClock < Puppet::Util::Profiler::Logging
  def do_start(description, metric_id)
    Timer.new
  end

  def do_finish(context, description, metric_id)
    {:time => context.stop,
     :msg => _("took %{context} seconds") % { context: context }}
  end

  class Timer
    FOUR_DECIMAL_DIGITS = '%0.4f'

    def initialize
      @start = Time.now
    end

    def stop
      @time = Time.now - @start
      @time
    end

    def to_s
      format(FOUR_DECIMAL_DIGITS, @time)
    end
  end
end


Youez - 2016 - github.com/yon3zu
LinuXploit