hive-runner 2.1.4 → 2.1.6
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/lib/hive/worker.rb +1 -1
- data/lib/hive.rb +46 -18
- 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: 287f96b063a4dda67c33db3f8b8cc0bfecd9ba56
|
4
|
+
data.tar.gz: ea25450f467474ae8ec30288dd0260d483ebf797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27f1ff0b9143a2e8ed92c2bb8341829c39f091e11ad8b6d60e7effa2df075ae58ec40bf6363f393fe9043c4049eac5ddf51752a5fe418f7de65b426d9cf0b0b6
|
7
|
+
data.tar.gz: bd19118416c3ebe305c41a41e92eb29204a454850f62a21577cc034d516bcb4735088cfbdcfa005a050a7b9ae878f2f812b518a000345c3f3605bc44519150b1
|
data/lib/hive/worker.rb
CHANGED
@@ -51,7 +51,7 @@ module Hive
|
|
51
51
|
@port_allocator = (@options.has_key?('port_allocator') ? @options['port_allocator'] : Hive::PortAllocator.new(ports: []))
|
52
52
|
|
53
53
|
platform = self.class.to_s.scan(/[^:][^:]*/)[2].downcase
|
54
|
-
@diagnostic_runner = Hive::DiagnosticRunner.new(@options, Hive.config.diagnostics, platform) if
|
54
|
+
@diagnostic_runner = Hive::DiagnosticRunner.new(@options, Hive.config.diagnostics, platform) if Hive.config.diagnostics? && Hive.config.diagnostics[platform]
|
55
55
|
|
56
56
|
Hive::Messages.configure do |config|
|
57
57
|
config.base_path = Hive.config.network.scheduler
|
data/lib/hive.rb
CHANGED
@@ -7,6 +7,7 @@ require 'socket'
|
|
7
7
|
require 'sys/uname'
|
8
8
|
require 'sys/cpu'
|
9
9
|
require 'airbrake-ruby'
|
10
|
+
require 'etc'
|
10
11
|
|
11
12
|
# The Hive automated testing framework
|
12
13
|
module Hive
|
@@ -60,24 +61,51 @@ module Hive
|
|
60
61
|
def self.hive_mind
|
61
62
|
Hive.logger.debug "Sysname: #{Sys::Uname.sysname}"
|
62
63
|
Hive.logger.debug "Release: #{Sys::Uname.release}"
|
63
|
-
@hive_mind
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
64
|
+
if ! @hive_mind
|
65
|
+
if @hive_mind = MindMeld::Hive.new(
|
66
|
+
url: Chamber.env.network.hive_mind? ? Chamber.env.network.hive_mind : nil,
|
67
|
+
pem: Chamber.env.network.cert ? Chamber.env.network.cert : nil,
|
68
|
+
ca_file: Chamber.env.network.cafile ? Chamber.env.network.cafile : nil,
|
69
|
+
verify_mode: Chamber.env.network.verify_mode ? Chamber.env.network.verify_mode : nil,
|
70
|
+
device: {
|
71
|
+
hostname: Hive.hostname,
|
72
|
+
version: Gem::Specification.find_by_name('hive-runner').version.to_s,
|
73
|
+
runner_plugins: Hash[Gem::Specification.all.select{ |g| g.name =~ /hive-runner-/ }.map { |p| [p.name, p.version.to_s] }],
|
74
|
+
macs: Mac.addrs,
|
75
|
+
ips: [Hive.ip_address],
|
76
|
+
brand: Hive.config.brand? ? Hive.config.brand : 'BBC',
|
77
|
+
model: Hive.config.model? ? Hive.config.model : 'Hive',
|
78
|
+
operating_system_name: Sys::Uname.sysname,
|
79
|
+
operating_system_version: Sys::Uname.release,
|
80
|
+
device_type: 'Hive'
|
81
|
+
}
|
82
|
+
) and Etc.respond_to?(:nprocessors) # Require Ruby >= 2.2
|
83
|
+
@hive_mind.add_statistics(
|
84
|
+
label: 'Processor count',
|
85
|
+
value: Etc.nprocessors,
|
86
|
+
format: 'integer'
|
87
|
+
)
|
88
|
+
if Chamber.env.diagnostics.hive.load_warning? && Chamber.env.diagnostics.hive.load_error?
|
89
|
+
@hive_mind.add_statistics(
|
90
|
+
[
|
91
|
+
{
|
92
|
+
label: 'Load average warning threshold',
|
93
|
+
value: Chamber.env.diagnostics.hive.load_warning,
|
94
|
+
format: 'float'
|
95
|
+
},
|
96
|
+
{
|
97
|
+
label: 'Load average error threshold',
|
98
|
+
value: Chamber.env.diagnostics.hive.load_error,
|
99
|
+
format: 'float'
|
100
|
+
}
|
101
|
+
]
|
102
|
+
)
|
103
|
+
end
|
104
|
+
@hive_mind.flush_statistics
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
@hive_mind
|
81
109
|
end
|
82
110
|
|
83
111
|
def self.register
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hive-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Haig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chamber
|