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.
- checksums.yaml +4 -4
- data/lib/strace_log.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5277fc2fae5e79d021699c073571c59b27e722b7
|
4
|
+
data.tar.gz: cbd13c2196e9d5b0b848d360e10b0fb221ffd62b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 391e5d822f5d129bc2d6af7bd4b7f84febcbee1ac3584e0252d893764617c4fb7a1f1e83eebe85e98c62470f33758a286547ff20c7672aa96777be87429439c9
|
7
|
+
data.tar.gz: fb547f067c6ce42b957f77cc980db33daa8f7808bd5d4d5d0da586a8a4da91f0edac0af635f3f8fa5ed2c93d98aec300b8949dc818d5d9c736ba3dbacd85c7a1
|
data/lib/strace_log.rb
CHANGED
@@ -2,13 +2,13 @@ require 'strscan'
|
|
2
2
|
|
3
3
|
module StraceLog
|
4
4
|
|
5
|
-
VERSION = "0.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
|
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| "
|
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.
|
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.
|
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-
|
11
|
+
date: 2015-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|