droid-monitor 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -2
- data/lib/droid/monitor/net.rb +3 -3
- data/lib/droid/monitor/version.rb +1 -1
- data/test/net_test.rb +3 -3
- 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: 57622c4fe19698dd8f490d7153a70638e5dcc703
|
4
|
+
data.tar.gz: 3d44ccd0b58ba19542d3a765ed46f97719575c5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b5d664cad81d23b0f53b8b902c0783c6225ba6caba0cf69835bfbd547081ad98b2e02bfc7ae2d12e516cf28694b3970b9f4f4212493ee4f5039df04ef8e397f
|
7
|
+
data.tar.gz: f29ff8042f17edfdea25bad5267abc1881b5fb1dcc5a2917815fb16e42e812c56377c14b35c38988137c3c0a1c64f36604172d66ee65868757c3ea04a863620a
|
data/README.md
CHANGED
@@ -45,6 +45,8 @@ output_file_path = "sample.html"
|
|
45
45
|
graph_opts = { title: "Example", header1: "this graph is just sample"}
|
46
46
|
@cpu.create_graph(filename, graph_opts, output_file_path)
|
47
47
|
|
48
|
+
#clear @cpu.cpu_usage
|
49
|
+
@cpu.clear_cpu_usage
|
48
50
|
```
|
49
51
|
|
50
52
|
#### Graph
|
@@ -70,7 +72,10 @@ filename = "sample_data.txt"
|
|
70
72
|
# export data into filename which is used the above command.
|
71
73
|
output_file_path = "sample.html"
|
72
74
|
graph_opts = { title: "Example", header1: "this graph is just sample"}
|
73
|
-
@
|
75
|
+
@memory.create_graph(filename, graph_opts, output_file_path)
|
76
|
+
|
77
|
+
#clear @memory.memory_detail_usage
|
78
|
+
@memory.clear_memory_usage
|
74
79
|
```
|
75
80
|
|
76
81
|
#### Graph
|
@@ -89,7 +94,7 @@ require "droid/monitor/net"
|
|
89
94
|
@data_file2 = "sample2.txt"
|
90
95
|
|
91
96
|
# save data into @net.tcp_rec, @net.tcp_snd
|
92
|
-
@net.
|
97
|
+
@net.store_dumped_tcp_rec
|
93
98
|
@net.store_dumped_tcp_snd
|
94
99
|
|
95
100
|
# export data into filename as google api format
|
@@ -104,6 +109,12 @@ output_file_path2 = "sample2.html"
|
|
104
109
|
graph_opts = { title: "Example", header1: "this graph is just sample"}
|
105
110
|
@net.create_graph(@data_file, graph_opts, output_file_path1)
|
106
111
|
@net.create_graph(@data_file2, graph_opts, output_file_path2)
|
112
|
+
|
113
|
+
# clear @net.tcp_rec and @net.tcp_snd
|
114
|
+
@net.clear_tcps
|
115
|
+
or
|
116
|
+
@net.clear_tcps_rec
|
117
|
+
@net.clear_tcps_snd
|
107
118
|
```
|
108
119
|
|
109
120
|
#### Graph
|
data/lib/droid/monitor/net.rb
CHANGED
@@ -30,7 +30,7 @@ module Droid
|
|
30
30
|
clear_tcps_snd
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
33
|
+
def dump_tcp_rec_usage(dump_data)
|
34
34
|
[dump_data.to_i]
|
35
35
|
end
|
36
36
|
|
@@ -39,8 +39,8 @@ module Droid
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# called directory
|
42
|
-
def
|
43
|
-
self.store_tcp_rec(self.
|
42
|
+
def store_dumped_tcp_rec
|
43
|
+
self.store_tcp_rec(self.dump_tcp_rec_usage(self.dump_tcp_rec))
|
44
44
|
end
|
45
45
|
|
46
46
|
def store_dumped_tcp_snd
|
data/test/net_test.rb
CHANGED
@@ -6,7 +6,7 @@ PACKAGE_PID = <<-EOS
|
|
6
6
|
userId=10475 gids=[1028, 1015, 3003]
|
7
7
|
EOS
|
8
8
|
|
9
|
-
|
9
|
+
TCP_REC = "174934"
|
10
10
|
|
11
11
|
TCP_SND = "374934"
|
12
12
|
|
@@ -35,7 +35,7 @@ class NetTest < Test::Unit::TestCase
|
|
35
35
|
|
36
36
|
def test_dump_net_recive_once
|
37
37
|
expected = [174934]
|
38
|
-
assert_equal(expected, @net.
|
38
|
+
assert_equal(expected, @net.dump_tcp_rec_usage(TCP_REC))
|
39
39
|
end
|
40
40
|
|
41
41
|
def test_dump_net_recive_zero
|
@@ -52,7 +52,7 @@ class NetTest < Test::Unit::TestCase
|
|
52
52
|
|
53
53
|
@net.store_tcp_rec(dummy_array)
|
54
54
|
|
55
|
-
result = @net.
|
55
|
+
result = @net.dump_tcp_rec_usage(TCP_REC)
|
56
56
|
|
57
57
|
@net.store_tcp_rec(result)
|
58
58
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droid-monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faml
|