beaker-benchmark 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/beaker-benchmark/helpers.rb +19 -5
- data/lib/beaker-benchmark/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ace71056e2ad39fd18f8c1b646b2f021c42e5514e521b6055e0dc42b2409d205
|
4
|
+
data.tar.gz: dafae52f6890a91fc1e8fe61383ac58ecf8782b449d5a634ffdd63d1f249e123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09d384d96f42b43be4a813b6b256759817c9505da085d3e8be151c0b4696cc0e776ecda28e8e001e758cc8f70b3e2255a9fd3da5fddaf445b57a77eb34ab13b1'
|
7
|
+
data.tar.gz: a5196d0a50e7b8c7f226a2c34c04f09839914da8f910d7348ca6fe0211e9e0cf021da427137df6d8159f4a01e13791db71726a65a4334b71baaf67ee6ef85638
|
@@ -1,6 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require "csv"
|
2
|
+
require "fileutils"
|
3
|
+
require "minitar"
|
4
|
+
require "time"
|
5
|
+
require "zlib"
|
4
6
|
|
5
7
|
module Beaker
|
6
8
|
module DSL
|
@@ -103,13 +105,25 @@ module Beaker
|
|
103
105
|
|
104
106
|
log_dir = "#{TMP_DIR}/#{infrastructure_host.hostname}"
|
105
107
|
FileUtils::mkdir_p log_dir unless Dir.exist? log_dir
|
106
|
-
|
108
|
+
|
109
|
+
# tar the atop log file before copying to avoid timeouts for large files (e.g. 2 week soak test)
|
110
|
+
tar_file_name = "#{@atop_log_filename}.tar.gz"
|
111
|
+
compress_cmd = "tar czf #{tar_file_name} #{@atop_log_filename}"
|
112
|
+
on infrastructure_host, compress_cmd
|
113
|
+
|
114
|
+
# copy the atop log file
|
115
|
+
scp_from(infrastructure_host, tar_file_name, log_dir)
|
116
|
+
|
117
|
+
# extract the tar file
|
118
|
+
tgz = Zlib::GzipReader.new(File.open("#{log_dir}/#{tar_file_name}", "rb"))
|
119
|
+
Archive::Tar::Minitar.unpack(tgz, log_dir)
|
120
|
+
|
107
121
|
cpu_usage = []
|
108
122
|
mem_usage = []
|
109
123
|
disk_read = []
|
110
124
|
disk_write = []
|
111
125
|
|
112
|
-
skip
|
126
|
+
skip = true
|
113
127
|
CSV.parse(File.read(File.expand_path(@atop_log_filename, log_dir)), { :col_sep => ' ' }) do |row|
|
114
128
|
#skip the first entry, until the first separator 'SEP'.
|
115
129
|
measure_type = row[MEASURE_TYPE_INDEX]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-benchmark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|