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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d364c9ffbb33d937c20b19d76c5cd038605dd3f051ff0c2b333a338086e7fc1
4
- data.tar.gz: ee0585b80157575a778fc3f153ee8798e219c825ae7bf9690124683a758d403a
3
+ metadata.gz: ace71056e2ad39fd18f8c1b646b2f021c42e5514e521b6055e0dc42b2409d205
4
+ data.tar.gz: dafae52f6890a91fc1e8fe61383ac58ecf8782b449d5a634ffdd63d1f249e123
5
5
  SHA512:
6
- metadata.gz: 74f817474f7eafbe19c40cd91461eb7d380fa29a2daf244d611e56a8818817d5716e5e295ccf88db9db92e48d0ddce38bf1af2ba164fded979546b8c5031f95c
7
- data.tar.gz: dcc8cdfbf6b07857348f6565b034405f50a2a9c31b65ee974d1fa9ce2193a980d8fa32b555ddcc17fb22a0849f0e27077424f8bfcd1fa9dd827e686403018da4
6
+ metadata.gz: '09d384d96f42b43be4a813b6b256759817c9505da085d3e8be151c0b4696cc0e776ecda28e8e001e758cc8f70b3e2255a9fd3da5fddaf445b57a77eb34ab13b1'
7
+ data.tar.gz: a5196d0a50e7b8c7f226a2c34c04f09839914da8f910d7348ca6fe0211e9e0cf021da427137df6d8159f4a01e13791db71726a65a4334b71baaf67ee6ef85638
@@ -1,6 +1,8 @@
1
- require 'csv'
2
- require 'fileutils'
3
- require 'time'
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
- scp_from(infrastructure_host, @atop_log_filename, log_dir)
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 = true
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]
@@ -3,7 +3,7 @@ module Beaker
3
3
  module BeakerBenchmark
4
4
 
5
5
  module Version
6
- STRING = '0.0.7'
6
+ STRING = '0.0.8'
7
7
  end
8
8
 
9
9
  end
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.7
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-14 00:00:00.000000000 Z
11
+ date: 2019-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec