kubernetes-deploy 0.12.0 → 0.12.1

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
  SHA1:
3
- metadata.gz: 3ce203eba2242a33d7bdf6d5e6ed33dce0de85c2
4
- data.tar.gz: 5d8ead3d6d9ca37ee9edc6701e98a2acdedffd31
3
+ metadata.gz: c20a5acd35ec91b8e4b2512a82b2d02b686de5a2
4
+ data.tar.gz: 4a19d08b989731002c6b6d18b1ecb428a70a61c7
5
5
  SHA512:
6
- metadata.gz: c81aaf0f6442b0dac0f2ce67c175eefe120574347eb470979f5f2d75c678e422cc92dd5959160a61e8069f9758a4919830ff5db4c5137911dd72df83b456181a
7
- data.tar.gz: dd78a292e16ae848bda6ed798c39eac63aa71395a1c5e447297d8f33262e3db47377a15537559b56fa3c2a3f5541607bb85c3987cf92366069b9b9a0974461f8
6
+ metadata.gz: 330f996992f1fd338f7d4723804a1b31c1a07c08c784606a787d6f989cae2f2b0205a067bbef0cf6a7f006d217b7c4b07d0901b685d99e746573b23bda39d39f
7
+ data.tar.gz: 7a9a2118a699b2ea430b146ad545bf091284a0af36a1b6c1bb32db52cab8c322e0db36933f5a88fb6e9168b8bcb6254eaf7f273e0099ad352fa5277312a7240b
data/.gitignore CHANGED
@@ -14,3 +14,6 @@
14
14
  .byebug_history
15
15
  .ruby-version
16
16
  coverage/*
17
+ dev/flamegraph.svg
18
+ dev/profile
19
+ dev/flamegraph.pl
data/Gemfile CHANGED
@@ -9,4 +9,6 @@ gem 'pry-byebug'
9
9
  gem 'rubocop'
10
10
  gem 'timecop'
11
11
  gem 'byebug'
12
- gem 'codecov', require: false, group: :test
12
+ gem 'codecov', require: false
13
+ gem 'ruby-prof', require: false
14
+ gem 'ruby-prof-flamegraph', require: false
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env bash
2
+ SVG_FILENAME="dev/flamegraph.svg"
3
+ PROFILE_FILENAME="dev/profile"
4
+ FLAMEGRAPH_PL="dev/flamegraph.pl"
5
+
6
+ if [[ -z $1 ]]; then
7
+ echo "Usage: `basename "$0"` TEST_NAME_OR_REGEX"
8
+ exit 1
9
+ fi
10
+
11
+ if ! [[ -s $FLAMEGRAPH_PL ]]; then
12
+ echo "Downloading flamegraph.pl"
13
+ curl -Lo $FLAMEGRAPH_PL https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl
14
+ fi
15
+
16
+ if [[ -f $SVG_FILENAME ]]; then
17
+ rm $SVG_FILENAME
18
+ fi
19
+
20
+ if [[ -f $PROFILE_FILENAME ]]; then
21
+ rm $PROFILE_FILENAME
22
+ fi
23
+
24
+ echo "Running test(s) with profiling"
25
+ PROFILE=1 bundle exec ruby -I test test/integration/kubernetes_deploy_test.rb -n /$1/ > /dev/null
26
+
27
+ echo "Processing profile"
28
+ cat $PROFILE_FILENAME | perl -w $FLAMEGRAPH_PL --countname=ms --width=1500 --title=$1 > $SVG_FILENAME
29
+
30
+ if [[ -f $SVG_FILENAME ]]; then
31
+ echo "Done. Opening ${SVG_FILENAME}"
32
+ open $SVG_FILENAME
33
+ else
34
+ echo "Done, but ${SVG_FILENAME} does not exist. Something went wrong."
35
+ fi
@@ -77,7 +77,7 @@ module KubernetesDeploy
77
77
  owners.any? { |ref| ref["uid"] == ds_data["metadata"]["uid"] } &&
78
78
  pod["metadata"]["labels"]["pod-template-generation"].to_i == template_generation.to_i
79
79
  end
80
- return unless latest_pods.present?
80
+ return [] unless latest_pods.present?
81
81
 
82
82
  latest_pods.each_with_object([]) do |pod_data, relevant_pods|
83
83
  pod = Pod.new(
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module KubernetesDeploy
3
- VERSION = "0.12.0"
3
+ VERSION = "0.12.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubernetes-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Verey
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-08-01 00:00:00.000000000 Z
12
+ date: 2017-08-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -197,6 +197,7 @@ files:
197
197
  - Rakefile
198
198
  - bin/ci
199
199
  - bin/setup
200
+ - dev/flamegraph-from-tests
200
201
  - exe/kubernetes-deploy
201
202
  - exe/kubernetes-restart
202
203
  - exe/kubernetes-run