kalibro_client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +2 -1
  4. data/README.md +1 -1
  5. data/features/metric_result/descendant_values.feature +2 -2
  6. data/features/metric_result/history_of.feature +2 -2
  7. data/features/metric_result/metric_results_of.feature +2 -2
  8. data/features/module_result/children.feature +2 -2
  9. data/features/module_result/find.feature +2 -2
  10. data/features/module_result/history_of.feature +2 -2
  11. data/features/processing/first_processing_after.feature +2 -2
  12. data/features/processing/first_processing_of.feature +2 -2
  13. data/features/processing/has_processing.feature +2 -2
  14. data/features/processing/has_processing_after.feature +2 -2
  15. data/features/processing/has_processing_before.feature +2 -2
  16. data/features/processing/has_ready_processing.feature +2 -2
  17. data/features/processing/last_processing_before.feature +2 -2
  18. data/features/processing/last_processing_of.feature +2 -2
  19. data/features/processing/last_processing_state_of.feature +2 -2
  20. data/features/processing/last_ready_processing_of.feature +2 -2
  21. data/features/processing/processing_of.feature +4 -4
  22. data/features/processing/processing_with_date_of.feature +4 -4
  23. data/features/repository/all.feature +2 -2
  24. data/features/repository/cancel_processing.feature +2 -2
  25. data/features/repository/destroy.feature +2 -2
  26. data/features/repository/exists.feature +2 -2
  27. data/features/repository/find.feature +2 -2
  28. data/features/repository/of.feature +2 -2
  29. data/features/repository/process.feature +2 -2
  30. data/kalibro_client.gemspec +2 -1
  31. data/lib/kalibro_client/entities/processor/metric_collector_details.rb +1 -2
  32. data/lib/kalibro_client/version.rb +1 -1
  33. data/lib/rake/test_task.rb +8 -0
  34. data/performance/base.rb +65 -0
  35. data/performance/performance.rb +7 -0
  36. data/performance/tests/metric_collector_details_find_by_code.rb +11 -0
  37. data/spec/spec_helper.rb +2 -5
  38. metadata +21 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ee463177f19553bdd84f4a3fca809c486c5ac53
4
- data.tar.gz: b46c3d43ba8f8f92275f88e71043c2f7da159e97
3
+ metadata.gz: 387feb2d4820e6db152bcdeb24cdf4ee45be437b
4
+ data.tar.gz: 104d850c560ce31ba13f59091848127624608068
5
5
  SHA512:
6
- metadata.gz: 4c1428cf4fbec3c9b3934b543b1099e161cd48b760a08c8d02988b65140ad04ef8758f3e120fa226eaa4e0ca122444639b561ac711e432249a5b549e4ca05c57
7
- data.tar.gz: 39319f9551c5a753ade4e302de32b708d1f1f864a82694462e79068f8c3b10f0e26dcd8138db08487ac623785afacd4f2327af181c5dea7260522c634192d118
6
+ metadata.gz: 84eb2753a64cf3b0ae885621400769cc62922ae8b7653b4c9529eb56a8721c8160146640db39d4b35fd532eb31421781a4439b21719dbae142361818660224e6
7
+ data.tar.gz: f5e9b407b3f7d03c0d1fe4eab8014b18dfe3ae70eaea217dd67992ed6698dc547b33ae11143d95378a9f2f78b75558695140908010c623aaf386fa237d573545
@@ -1 +1 @@
1
- ruby-2.2.0
1
+ ruby-2.2.2
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.0
3
+ - 2.2.2
4
4
 
5
5
  addons:
6
6
  postgresql: "9.3"
@@ -14,6 +14,7 @@ before_script:
14
14
  - popd
15
15
  - cp features/support/kalibro_cucumber_helpers.yml.sample features/support/kalibro_cucumber_helpers.yml
16
16
  - export BUNDLE_GEMFILE=$PWD/Gemfile
17
+ - export CODECLIMATE_REPO_TOKEN=46cbb96b053b03ad66b0355bd96d0787f56fc5a4fc171b8d6eb30c421c5e6777
17
18
 
18
19
  script:
19
20
  - bundle exec rspec spec
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/mezuro/kalibro_client.png?branch=master)](https://travis-ci.org/mezuro/kalibro_client)
4
4
  [![Code Climate](https://codeclimate.com/github/mezuro/kalibro_client.png)](https://codeclimate.com/github/mezuro/kalibro_client)
5
- [![Coverage Status](https://coveralls.io/repos/mezuro/kalibro_client/badge.png)](https://coveralls.io/r/mezuro/kalibro_client)
5
+ [![Test Coverage](https://codeclimate.com/github/mezuro/kalibro_client/badges/coverage.svg)](https://codeclimate.com/github/mezuro/kalibro_client)
6
6
 
7
7
  KalibroClient is a Ruby gem intended to be an interface for Ruby applications who want to use the open source code analysis webservice Kalibro (http://gitorious.org/kalibro/kalibro).
8
8
 
@@ -10,8 +10,8 @@ Feature: Descendant values
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I call the first_processing_of method for the given repository
@@ -11,8 +11,8 @@ Feature: history of
11
11
  And I have a metric with name "Lines of Code"
12
12
  And I have a loc configuration within the given kalibro configuration
13
13
  And the given project has the following Repositories:
14
- | name | scm_type | address |
15
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
14
+ | name | scm_type | address |
15
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
16
16
  And I call the process method for the given repository
17
17
  And I wait up for a ready processing
18
18
  And I call the first_processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Metric results of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I call the first_processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Children
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  When I ask for the children of the processing root module result
@@ -10,8 +10,8 @@ Feature: Find
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  When I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I get the module result of the processing
@@ -10,8 +10,8 @@ Feature: /history of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  And I get the module result of the processing
@@ -10,8 +10,8 @@ Feature: First processing after
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the first_processing_after method for the given repository and yesterday's date
@@ -10,8 +10,8 @@ Feature: First processing of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the first_processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Has processing
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing for the given repository
@@ -10,8 +10,8 @@ Feature: Has processing after
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing_after for the given repository with yerterday's date
@@ -10,8 +10,8 @@ Feature: Has processing before
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_processing_before for the given repository with tomorrows's date
@@ -10,8 +10,8 @@ Feature: Has ready processing
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the has_ready_processing for the given repository
@@ -10,8 +10,8 @@ Feature: Last processing before
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing_before method for the given repository and tomorrow's date
@@ -10,8 +10,8 @@ Feature: Last processing of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Last processing state of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the last_processing_state_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Last ready processing of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up for a ready processing
17
17
  When I call the last_ready_processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Processing of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the processing_of method for the given repository
@@ -24,8 +24,8 @@ Feature: Processing of
24
24
  And I have a reading group with name "Group"
25
25
  And I have a loc configuration within the given kalibro configuration
26
26
  And the given project has the following Repositories:
27
- | name | scm_type | address |
28
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
27
+ | name | scm_type | address |
28
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
29
29
  And I call the process method for the given repository
30
30
  And I wait up for a ready processing
31
31
  When I call the processing_of method for the given repository
@@ -10,8 +10,8 @@ Feature: Processing with date of
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  And I call the process method for the given repository
16
16
  And I wait up to 1 seconds
17
17
  When I call the processing_with_date_of method for the given repository and tomorrow's date
@@ -24,8 +24,8 @@ Feature: Processing with date of
24
24
  And I have a reading group with name "Group"
25
25
  And I have a loc configuration within the given kalibro configuration
26
26
  And the given project has the following Repositories:
27
- | name | scm_type | address |
28
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
27
+ | name | scm_type | address |
28
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
29
29
  And I call the process method for the given repository
30
30
  And I wait up to 1 seconds
31
31
  When I call the processing_with_date_of method for the given repository and yesterday's date
@@ -8,7 +8,7 @@ Feature: Repositories listing
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I ask for all the repositories
14
14
  Then the response should contain the given repository
@@ -8,7 +8,7 @@ Feature: Process
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I call the cancel_process method for the given repository
14
14
  Then I should get success
@@ -8,7 +8,7 @@ Feature: Repositories destroying
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I destroy the repository
14
14
  Then the repository should no longer exist
@@ -8,7 +8,7 @@ Feature: Repositories listing
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I ask to check if the given repository exists
14
14
  Then I should get true
@@ -8,7 +8,7 @@ Feature: Repositories listing
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I ask to find the given repository
14
14
  Then I should get the given repository
@@ -8,8 +8,8 @@ Feature: Repositories listing
8
8
  Given I have a project with name "Kalibro"
9
9
  And I have a kalibro configuration with name "Java"
10
10
  And the given project has the following Repositories:
11
- | name | scm_type | address |
12
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
11
+ | name | scm_type | address |
12
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
13
13
  When I ask for repositories from the given project
14
14
  Then I should get a list with the given repository
15
15
  And the repositories should contain the project id
@@ -10,7 +10,7 @@ Feature: Process
10
10
  And I have a reading group with name "Group"
11
11
  And I have a loc configuration within the given kalibro configuration
12
12
  And the given project has the following Repositories:
13
- | name | scm_type | address |
14
- | Kalibro | GIT | https://git.gitorious.org/sbking/sbking.git |
13
+ | name | scm_type | address |
14
+ | Kalibro | GIT | https://github.com/rafamanzo/runge-kutta-vtk.git |
15
15
  When I call the process method for the given repository
16
16
  Then I should get success
@@ -42,7 +42,8 @@ Gem::Specification.new do |spec|
42
42
  spec.add_development_dependency "mocha", "~> 1.1.0"
43
43
  spec.add_development_dependency "simplecov"
44
44
  spec.add_development_dependency "factory_girl", "~> 4.5.0"
45
- spec.add_development_dependency 'coveralls'
45
+ spec.add_development_dependency "codeclimate-test-reporter"
46
+ spec.add_development_dependency "ruby-prof"
46
47
 
47
48
  spec.add_dependency "activesupport", ">= 2.2.1" #version in which underscore was introduced
48
49
  spec.add_dependency "faraday_middleware", "~> 0.9.0"
@@ -33,8 +33,7 @@ module KalibroClient
33
33
  end
34
34
 
35
35
  def find_metric_by_code(metric_code)
36
- metric = self.supported_metrics.find {|code, metric| metric.code == metric_code}
37
- metric.nil? ? nil : metric.last
36
+ @supported_metrics[metric_code]
38
37
  end
39
38
 
40
39
  def self.find_by_name(metric_collector_name)
@@ -15,5 +15,5 @@
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  module KalibroClient
18
- VERSION = "0.1.0"
18
+ VERSION = "0.1.1"
19
19
  end
@@ -49,6 +49,14 @@ module KalibroClient
49
49
  puts "Running the acceptance tests with \"#{acceptance_tests_command}\"\n\n"
50
50
  system acceptance_tests_command
51
51
  end
52
+
53
+ desc 'Runs the performance tests'
54
+ task :performance do |t, args|
55
+ performance_tests_command = "bundle exec ruby performance/tests/*"
56
+
57
+ puts "Running the acceptance tests with \"#{performance_tests_command}\"\n\n"
58
+ system performance_tests_command
59
+ end
52
60
  end
53
61
  end
54
62
  end
@@ -0,0 +1,65 @@
1
+ module Performance
2
+ class Base
3
+ def initialize
4
+ @results = {}
5
+ end
6
+
7
+ def setup; end
8
+ def teardown; end
9
+
10
+ def subject; raise NotImplementedError; end
11
+
12
+ def run
13
+ self.run_process_time
14
+ self.run_wall_time
15
+
16
+ self.print
17
+ end
18
+
19
+ protected
20
+
21
+ def run_wall_time
22
+ self.setup
23
+
24
+ RubyProf.measure_mode = RubyProf::WALL_TIME
25
+
26
+ @results['Wall Time'] = []
27
+ (1..5).each do |it|
28
+ @results['Wall Time'] << RubyProf.profile do
29
+ self.subject
30
+ end
31
+ end
32
+
33
+ self.teardown
34
+ end
35
+
36
+ def run_process_time
37
+ self.setup
38
+
39
+ RubyProf.measure_mode = RubyProf::PROCESS_TIME
40
+
41
+ @results['Process Time'] = []
42
+ (1..5).each do |it|
43
+ @results['Process Time'] << RubyProf.profile do
44
+ self.subject
45
+ end
46
+ end
47
+
48
+ self.teardown
49
+ end
50
+
51
+ def print
52
+ puts "\n"
53
+ puts "#{self.class.name}\n----------"
54
+
55
+ @results.each do |title, result|
56
+ total = 0.0
57
+
58
+ result.each { |r| r.threads.each { |thread| total += thread.total_time} }
59
+
60
+ puts "* #{title}: #{total/result.count}"
61
+ end
62
+ puts "\n"
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,7 @@
1
+ require 'ruby-prof'
2
+ require 'active_support/core_ext/string'
3
+ require 'kalibro_client'
4
+
5
+ require_relative 'base'
6
+
7
+ module Performance; end
@@ -0,0 +1,11 @@
1
+ require_relative '../performance'
2
+
3
+ module Performance
4
+ class MetricCollectorDetailsFindByCode < Base
5
+ def subject
6
+ KalibroClient::Entities::Processor::MetricCollectorDetails.find_by_name("Analizo").find_metric_by_code("acc")
7
+ end
8
+ end
9
+ end
10
+
11
+ Performance::MetricCollectorDetailsFindByCode.new.run
@@ -18,13 +18,10 @@ require 'mocha/api'
18
18
 
19
19
  # Test coverage report
20
20
  require 'simplecov'
21
- require 'coveralls'
21
+ require "codeclimate-test-reporter"
22
+ CodeClimate::TestReporter.start
22
23
 
23
24
  SimpleCov.start do
24
- formatter SimpleCov::Formatter::MultiFormatter[
25
- Coveralls::SimpleCov::Formatter,
26
- SimpleCov::Formatter::HTMLFormatter
27
- ]
28
25
  add_group "Entities", "lib/kalibro_client/entities"
29
26
  add_group "Errors", "lib/kalibro_client/errors"
30
27
  add_group "Helpers", "lib/kalibro_client/helpers"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kalibro_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego de Araújo Martinez Camarinha
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-04-01 00:00:00.000000000 Z
14
+ date: 2015-05-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -112,7 +112,21 @@ dependencies:
112
112
  - !ruby/object:Gem::Version
113
113
  version: 4.5.0
114
114
  - !ruby/object:Gem::Dependency
115
- name: coveralls
115
+ name: codeclimate-test-reporter
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ - !ruby/object:Gem::Dependency
129
+ name: ruby-prof
116
130
  requirement: !ruby/object:Gem::Requirement
117
131
  requirements:
118
132
  - - ">="
@@ -285,6 +299,9 @@ files:
285
299
  - lib/kalibro_client/kalibro_cucumber_helpers/hooks.rb
286
300
  - lib/kalibro_client/version.rb
287
301
  - lib/rake/test_task.rb
302
+ - performance/base.rb
303
+ - performance/performance.rb
304
+ - performance/tests/metric_collector_details_find_by_code.rb
288
305
  - spec/entities/base_spec.rb
289
306
  - spec/entities/configurations/base_spec.rb
290
307
  - spec/entities/configurations/kalibro_configuration_spec.rb
@@ -358,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
358
375
  version: '0'
359
376
  requirements: []
360
377
  rubyforge_project:
361
- rubygems_version: 2.4.5
378
+ rubygems_version: 2.4.6
362
379
  signing_key:
363
380
  specification_version: 4
364
381
  summary: KalibroClient is a communication interface with the KalibroProcessor and