strace_log 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/strace_log.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4867082d048a96d9ed999f1fe912e25b4d181fbb
4
- data.tar.gz: 7ce5f28bbb104f4226e7535905cae484c397aad5
3
+ metadata.gz: 5277fc2fae5e79d021699c073571c59b27e722b7
4
+ data.tar.gz: cbd13c2196e9d5b0b848d360e10b0fb221ffd62b
5
5
  SHA512:
6
- metadata.gz: 0c8730598135cba2342dd84c877ef6a4c348c51bcc36510f3a388944b42e1b291cf3254b83adf34757eaf1f93cc122dafbd998d58946d5965d21db215aaebda7
7
- data.tar.gz: c5f1d219b1b5294620def6912fb5cb0a5814f0c6940ef5b3e04a682ce1999dc4a625cf881aa1a5ff49d3b9da1d73d10d0f39f351653adc037c008bf45f3eae59
6
+ metadata.gz: 391e5d822f5d129bc2d6af7bd4b7f84febcbee1ac3584e0252d893764617c4fb7a1f1e83eebe85e98c62470f33758a286547ff20c7672aa96777be87429439c9
7
+ data.tar.gz: fb547f067c6ce42b957f77cc980db33daa8f7808bd5d4d5d0da586a8a4da91f0edac0af635f3f8fa5ed2c93d98aec300b8949dc818d5d9c736ba3dbacd85c7a1
@@ -2,13 +2,13 @@ require 'strscan'
2
2
 
3
3
  module StraceLog
4
4
 
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
 
7
7
  class ParsedCall
8
8
  ESCAPES = [ /x[\da-f][\da-f]/i, /n/, /t/, /r/, /\\/, /"/, /\d+/]
9
9
 
10
10
  def initialize(line)
11
- if /^---.*---$/ =~ line
11
+ if /^(?:(\d\d:\d\d:\d\d|\d+)(?:\.(\d+))? )?---.*---$/ =~ line
12
12
  @mesg = line
13
13
  else
14
14
  s = StringScanner.new(line)
@@ -137,7 +137,7 @@ module StraceLog
137
137
  end
138
138
  if !@time.empty?
139
139
  keys = @time.keys.sort
140
- Kernel.print " time={"+keys.map{|k| "#{k}:#{@time[k]}"}.join(", ")+"}\n"
140
+ Kernel.print " time={"+keys.map{|k| "%s:%.6g"%[k,@time[k]]}.join(", ")+"}\n"
141
141
  end
142
142
  if !@rename.empty?
143
143
  Kernel.print " rename={#{@rename.join(', ')}}\n"
@@ -253,7 +253,7 @@ module StraceLog
253
253
  Kernel.print "}\n\n"
254
254
  Kernel.print "time={\n"
255
255
  @spent.each do |m,t|
256
- Kernel.print " #{m}: #{t},\n"
256
+ Kernel.printf " %s: %.6g,\n",m,t
257
257
  end
258
258
  Kernel.print "}\n\n"
259
259
  files = @stat.keys.select{|x| x.class==String}.sort
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strace_log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro TANAKA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-18 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler