lib/travis/cli/api_command.rb in travis-1.1.2 vs lib/travis/cli/api_command.rb in travis-1.1.3
- old
+ new
@@ -12,11 +12,14 @@
on('--org', "short-cut for --api-endpoint '#{Travis::Client::ORG_URI}'") { |c,_| c.api_endpoint = Travis::Client::ORG_URI }
on('-t', '--token [ACCESS_TOKEN]', 'access token to use') { |c, t| c.access_token = t }
on('--debug', 'show API requests') do |c,_|
c.session.instrument do |info, request|
+ start = Time.now
c.debug(info)
request.call
+ duration = Time.now - start
+ c.debug(" took %.2g seconds" % duration)
end
end
def initialize(*)
@session = Travis::Client.new