logstash-perftool 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/lsperfm-deps +5 -2
- data/lib/lsperfm/version.rb +1 -1
- data/logstash-perftool.gemspec +1 -1
- metadata +4 -33
- data/.gitignore +0 -4
- data/.rspec +0 -3
- data/CONTRIBUTORS +0 -11
- data/Gemfile +0 -3
- data/LICENSE +0 -13
- data/README.md +0 -119
- data/Rakefile +0 -10
- data/examples/config/complex_syslog.conf +0 -46
- data/examples/config/json_inout_codec.conf +0 -11
- data/examples/config/json_inout_filter.conf +0 -11
- data/examples/config/simple.conf +0 -11
- data/examples/config/simple_grok.conf +0 -13
- data/examples/config/simple_json_out.conf +0 -11
- data/examples/input/apache_log.txt +0 -30
- data/examples/input/json_medium.txt +0 -10
- data/examples/input/simple_10.txt +0 -10
- data/examples/input/syslog_acl_10.txt +0 -10
- data/examples/suite/basic_performance_long.rb +0 -18
- data/examples/suite/basic_performance_quick.rb +0 -18
- data/scripts/loader.rb +0 -114
- data/scripts/setup.sh +0 -63
- data/spec/fixtures/config.yml +0 -4
- data/spec/fixtures/simple.conf +0 -11
- data/spec/fixtures/simple_10.txt +0 -10
- data/spec/fixtures/wrong_config.yml +0 -4
- data/suite.rb +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364150ea9c3cb9e29416228677e91a30cce449f2
|
4
|
+
data.tar.gz: 717c160ff07972f8a91bfb36a02bfc7d3c353713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1757235c124f83ebd6edbf84f56ba1a338909644e322392d8b1efa877627a8c7d4cd5642724a552b79b20f64d9fa9ccec24dccf334b72946be813f82a12f35a3
|
7
|
+
data.tar.gz: 1a815058df716061eeb8da5c8c90238d2e1391dcb29fb3155b3422102ab1ce34d6880f1c04ff6d114e46d349b5d8052e230e48b362eb5a46d25587ba09a862b2
|
data/bin/lsperfm-deps
CHANGED
@@ -20,10 +20,13 @@ else
|
|
20
20
|
|
21
21
|
# why do bootstrap here? can't we assume you must have a working logstash distribution?
|
22
22
|
# `#{rake} bootstrap`
|
23
|
-
|
23
|
+
installer = File.join(base_dir, "bin", "plugin")
|
24
|
+
if !File.exist?(installer)
|
25
|
+
installer = File.join(base_dir, "bin", "logstash-plugin")
|
26
|
+
end
|
24
27
|
[inputs, outputs, filters].each do |plugins|
|
25
28
|
plugins.map{|s| "logstash-#{s}"}.each do |plugin|
|
26
|
-
command = "#{
|
29
|
+
command = "#{installer} install #{plugin}"
|
27
30
|
puts "#{command}\n#{%x[#{command}]}"
|
28
31
|
end
|
29
32
|
end
|
data/lib/lsperfm/version.rb
CHANGED
data/logstash-perftool.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.homepage = "http://logstash.net/"
|
10
10
|
gem.license = "Apache License (2.0)"
|
11
11
|
|
12
|
-
gem.files =
|
12
|
+
gem.files = Dir.glob(["logstash-perftool.gemspec", "lib/**/*", "spec/**/*.rb", "bin/*"])
|
13
13
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
14
|
gem.name = "logstash-perftool"
|
15
15
|
gem.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-perftool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pere Urbon-Bayes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,27 +67,8 @@ executables:
|
|
67
67
|
extensions: []
|
68
68
|
extra_rdoc_files: []
|
69
69
|
files:
|
70
|
-
- .gitignore
|
71
|
-
- .rspec
|
72
|
-
- CONTRIBUTORS
|
73
|
-
- Gemfile
|
74
|
-
- LICENSE
|
75
|
-
- README.md
|
76
|
-
- Rakefile
|
77
70
|
- bin/lsperfm
|
78
71
|
- bin/lsperfm-deps
|
79
|
-
- examples/config/complex_syslog.conf
|
80
|
-
- examples/config/json_inout_codec.conf
|
81
|
-
- examples/config/json_inout_filter.conf
|
82
|
-
- examples/config/simple.conf
|
83
|
-
- examples/config/simple_grok.conf
|
84
|
-
- examples/config/simple_json_out.conf
|
85
|
-
- examples/input/apache_log.txt
|
86
|
-
- examples/input/json_medium.txt
|
87
|
-
- examples/input/simple_10.txt
|
88
|
-
- examples/input/syslog_acl_10.txt
|
89
|
-
- examples/suite/basic_performance_long.rb
|
90
|
-
- examples/suite/basic_performance_quick.rb
|
91
72
|
- lib/lsperfm.rb
|
92
73
|
- lib/lsperfm/core.rb
|
93
74
|
- lib/lsperfm/core/reporter.rb
|
@@ -108,17 +89,10 @@ files:
|
|
108
89
|
- lib/lsperfm/defaults/suite/quick.rb
|
109
90
|
- lib/lsperfm/version.rb
|
110
91
|
- logstash-perftool.gemspec
|
111
|
-
- scripts/loader.rb
|
112
|
-
- scripts/setup.sh
|
113
92
|
- spec/fixtures/basic_suite.rb
|
114
|
-
- spec/fixtures/config.yml
|
115
|
-
- spec/fixtures/simple.conf
|
116
|
-
- spec/fixtures/simple_10.txt
|
117
|
-
- spec/fixtures/wrong_config.yml
|
118
93
|
- spec/lib/runner_spec.rb
|
119
94
|
- spec/lib/suite_spec.rb
|
120
95
|
- spec/spec_helper.rb
|
121
|
-
- suite.rb
|
122
96
|
homepage: http://logstash.net/
|
123
97
|
licenses:
|
124
98
|
- Apache License (2.0)
|
@@ -139,16 +113,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
113
|
version: '0'
|
140
114
|
requirements: []
|
141
115
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.4.
|
116
|
+
rubygems_version: 2.4.6
|
143
117
|
signing_key:
|
144
118
|
specification_version: 4
|
145
119
|
summary: With this gem you can run core performance test for your logstash-core pipeline
|
146
120
|
test_files:
|
147
121
|
- spec/fixtures/basic_suite.rb
|
148
|
-
- spec/fixtures/config.yml
|
149
|
-
- spec/fixtures/simple.conf
|
150
|
-
- spec/fixtures/simple_10.txt
|
151
|
-
- spec/fixtures/wrong_config.yml
|
152
122
|
- spec/lib/runner_spec.rb
|
153
123
|
- spec/lib/suite_spec.rb
|
154
124
|
- spec/spec_helper.rb
|
125
|
+
has_rdoc:
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/CONTRIBUTORS
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
The following is a list of people who have contributed ideas, code, bug
|
2
|
-
reports, or in general have helped logstash along its way.
|
3
|
-
|
4
|
-
Contributors:
|
5
|
-
* Pere Urbon-Bayes (purbon)
|
6
|
-
* Colin Surprenant (colin)
|
7
|
-
|
8
|
-
Note: If you've sent me patches, bug reports, or otherwise contributed to
|
9
|
-
logstash, and you aren't on the list above and want to be, please let me know
|
10
|
-
and I'll make sure you're here. Contributions from folks like you are what make
|
11
|
-
open source awesome.
|
data/Gemfile
DELETED
data/LICENSE
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
|
2
|
-
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
you may not use this file except in compliance with the License.
|
5
|
-
You may obtain a copy of the License at
|
6
|
-
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|
data/README.md
DELETED
@@ -1,119 +0,0 @@
|
|
1
|
-
# Performance Testing for Logstash
|
2
|
-
|
3
|
-
## Installation
|
4
|
-
|
5
|
-
You can use this code as a gem within your logstash project, to proceed with the installation you can either download the code and build the gem using the next command:
|
6
|
-
|
7
|
-
To run a benchmark using the Logstash Performance meter tool you will need to install this gem in your system, and to do it you can run the next command:
|
8
|
-
|
9
|
-
* ```gem install logstash-perftool```
|
10
|
-
|
11
|
-
This will make the last version of this gem available to you.
|
12
|
-
|
13
|
-
or, if you like to be on the edge, you can add it to your Gemfile like this:
|
14
|
-
|
15
|
-
gem 'logstash-perftool', :git => 'https://github.com/elastic/logstash-performance-testing.git'
|
16
|
-
|
17
|
-
and then do budler update.
|
18
|
-
|
19
|
-
## Setup and Runtime
|
20
|
-
|
21
|
-
The most simple scenario you could find is using the default set of
|
22
|
-
test, available in this gem. To do this you can simple run the ```lsperfm```
|
23
|
-
from the root of your Logstash installation.
|
24
|
-
|
25
|
-
If you like to add you own configurations and test suites, you need the next data (you can see an example of them at the `examples/` directory):
|
26
|
-
|
27
|
-
- The logstash configs, found in `..config/`
|
28
|
-
- The sample input files, found in `..input/`
|
29
|
-
- The suites definitions, found in `..suite/`
|
30
|
-
|
31
|
-
### Configuration
|
32
|
-
|
33
|
-
If you add a file named ```.lsperfm.yml``` in your main logstash directory you can have your configuration and input files in non standard
|
34
|
-
location.
|
35
|
-
|
36
|
-
Example:
|
37
|
-
|
38
|
-
```
|
39
|
-
default:
|
40
|
-
path: 'config-path'
|
41
|
-
config: ''
|
42
|
-
input: ''
|
43
|
-
```
|
44
|
-
|
45
|
-
### Bootstrap
|
46
|
-
|
47
|
-
Before you can run your test is necessary to bootstrap your logstash installation and install the test dependencies, to do that you must:
|
48
|
-
|
49
|
-
If you are in 1.5.x:
|
50
|
-
- Run `rake bootstrap` to setup the system.
|
51
|
-
- Run `lsperfm-deps` to install the test dependencies
|
52
|
-
For 1.4:
|
53
|
-
- Run `bin/logstash deps` to setup everything.
|
54
|
-
|
55
|
-
## Performance tests
|
56
|
-
|
57
|
-
The test are run in groups called suites.
|
58
|
-
|
59
|
-
### How to execute the default tests
|
60
|
-
|
61
|
-
This is the most simple use case you can have. To run the default tests
|
62
|
-
you can simply run ```lsperfm``` from the root of your Logstash
|
63
|
-
installation and the tool will use the default test suite.
|
64
|
-
|
65
|
-
### How to run a custom test suite
|
66
|
-
|
67
|
-
- suites examples can be found in `examples/suite/`
|
68
|
-
|
69
|
-
```
|
70
|
-
lsperfm [suite definition]
|
71
|
-
```
|
72
|
-
|
73
|
-
a suite file defines a series of tests to run.
|
74
|
-
|
75
|
-
#### suite file format
|
76
|
-
|
77
|
-
```ruby
|
78
|
-
# each test can be executed by either target duration using :time => N secs
|
79
|
-
# or by number of events with :events => N
|
80
|
-
#
|
81
|
-
#[
|
82
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 30},
|
83
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :events => 50000},
|
84
|
-
#]
|
85
|
-
#
|
86
|
-
[
|
87
|
-
{:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 60},
|
88
|
-
{:name => "simple line out", :config => "config/simple.conf", :input => "input/simple_10.txt", :time => 60},
|
89
|
-
{:name => "json codec", :config => "config/json_inout_codec.conf", :input => "input/json_medium.txt", :time => 60},
|
90
|
-
{:name => "json filter", :config => "config/json_inout_filter.conf", :input => "input/json_medium.txt", :time => 60},
|
91
|
-
{:name => "complex syslog", :config => "config/complex_syslog.conf", :input => "input/syslog_acl_10.txt", :time => 60},
|
92
|
-
]
|
93
|
-
```
|
94
|
-
|
95
|
-
## Contributing
|
96
|
-
|
97
|
-
All contributions are welcome: ideas, patches, documentation, bug reports,
|
98
|
-
complaints, and even something you drew up on a napkin.
|
99
|
-
|
100
|
-
Programming is not a required skill. Whatever you've seen about open source and
|
101
|
-
maintainers or community members saying "send patches or die" - you will not
|
102
|
-
see that here.
|
103
|
-
|
104
|
-
It is more important to me that you are able to contribute.
|
105
|
-
|
106
|
-
### Contribution Steps
|
107
|
-
|
108
|
-
1. Test your changes! Write test and run the test suites.
|
109
|
-
2. Please make sure you have signed our [Contributor License
|
110
|
-
Agreement](http://www.elastic.co/contributor-agreement/). We are not
|
111
|
-
asking you to assign copyright to us, but to give us the right to distribute
|
112
|
-
your code without restriction. We ask this of all contributors in order to
|
113
|
-
assure our users of the origin and continuing existence of the code. You
|
114
|
-
only need to sign the CLA once.
|
115
|
-
3. Send a pull request! Push your changes to your fork of the repository and
|
116
|
-
[submit a pull
|
117
|
-
request](https://help.github.com/articles/using-pull-requests). In the pull
|
118
|
-
request, describe what your changes do and mention any bugs/issues related
|
119
|
-
to the pull request.
|
data/Rakefile
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
input {
|
2
|
-
stdin {
|
3
|
-
type => syslog
|
4
|
-
}
|
5
|
-
}
|
6
|
-
|
7
|
-
filter {
|
8
|
-
if [type] == "syslog" {
|
9
|
-
grok {
|
10
|
-
match => { "message" => "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{PROG:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
|
11
|
-
add_field => [ "received_at", "%{@timestamp}" ]
|
12
|
-
add_field => [ "received_from", "%{syslog_hostname}" ]
|
13
|
-
}
|
14
|
-
syslog_pri { }
|
15
|
-
date {
|
16
|
-
match => ["syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
|
17
|
-
}
|
18
|
-
|
19
|
-
if [syslog_timestamp] {
|
20
|
-
mutate {
|
21
|
-
add_field => [ "[times][created_at]", "%{syslog_timestamp}"]
|
22
|
-
add_field => [ "[times][received_at]", "%{@timestamp}"]
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
mutate {
|
27
|
-
add_field => [ "[hosts][source]", "%{received_from}"]
|
28
|
-
add_field => [ "[level][facility]", "%{syslog_facility}"]
|
29
|
-
add_field => [ "[level][severity]", "%{syslog_severity}"]
|
30
|
-
}
|
31
|
-
|
32
|
-
if !("_grokparsefailure" in [tags]) {
|
33
|
-
mutate {
|
34
|
-
replace => [ "@source_host", "%{syslog_hostname}" ]
|
35
|
-
replace => [ "@message", "%{syslog_message}" ]
|
36
|
-
}
|
37
|
-
}
|
38
|
-
mutate {
|
39
|
-
remove_field => [ "syslog_hostname", "syslog_message", "syslog_timestamp" ]
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
output {
|
45
|
-
stdout { codec => json_lines }
|
46
|
-
}
|
data/examples/config/simple.conf
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
83.149.9.216 - - [17/Sep/2014:07:13:42 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-search.png HTTP/1.1" 200 203023 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
2
|
-
83.149.9.216 - - [17/Sep/2014:07:13:42 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard3.png HTTP/1.1" 200 171717 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
3
|
-
83.149.9.216 - - [17/Sep/2014:07:13:44 +0000] "GET /presentations/logstash-monitorama-2013/plugin/highlight/highlight.js HTTP/1.1" 200 26185 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
4
|
-
83.149.9.216 - - [17/Sep/2014:07:13:44 +0000] "GET /presentations/logstash-monitorama-2013/plugin/zoom-js/zoom.js HTTP/1.1" 200 7697 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
5
|
-
83.149.9.216 - - [17/Sep/2014:07:13:45 +0000] "GET /presentations/logstash-monitorama-2013/plugin/notes/notes.js HTTP/1.1" 200 2892 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
6
|
-
83.149.9.216 - - [17/Sep/2014:07:13:42 +0000] "GET /presentations/logstash-monitorama-2013/images/sad-medic.png HTTP/1.1" 200 430406 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
7
|
-
83.149.9.216 - - [17/Sep/2014:07:13:45 +0000] "GET /presentations/logstash-monitorama-2013/css/fonts/Roboto-Bold.ttf HTTP/1.1" 200 38720 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
8
|
-
83.149.9.216 - - [17/Sep/2014:07:13:45 +0000] "GET /presentations/logstash-monitorama-2013/css/fonts/Roboto-Regular.ttf HTTP/1.1" 200 41820 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
9
|
-
83.149.9.216 - - [17/Sep/2014:07:13:45 +0000] "GET /presentations/logstash-monitorama-2013/images/frontend-response-codes.png HTTP/1.1" 200 52878 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
10
|
-
83.149.9.216 - - [17/Sep/2014:07:13:43 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard.png HTTP/1.1" 200 321631 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
11
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/Dreamhost_logo.svg HTTP/1.1" 200 2126 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
12
|
-
83.149.9.216 - - [17/Sep/2014:07:13:43 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard2.png HTTP/1.1" 200 394967 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
13
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/apache-icon.gif HTTP/1.1" 200 8095 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
14
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/nagios-sms5.png HTTP/1.1" 200 78075 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
15
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/redis.png HTTP/1.1" 200 25230 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
16
|
-
83.149.9.216 - - [17/Sep/2014:07:13:47 +0000] "GET /presentations/logstash-monitorama-2013/images/elasticsearch.png HTTP/1.1" 200 8026 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
17
|
-
83.149.9.216 - - [17/Sep/2014:07:13:47 +0000] "GET /presentations/logstash-monitorama-2013/images/logstashbook.png HTTP/1.1" 200 54662 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
18
|
-
83.149.9.216 - - [17/Sep/2014:07:13:47 +0000] "GET /presentations/logstash-monitorama-2013/images/github-contributions.png HTTP/1.1" 200 34245 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
19
|
-
83.149.9.216 - - [17/Sep/2014:07:13:47 +0000] "GET /presentations/logstash-monitorama-2013/css/print/paper.css HTTP/1.1" 200 4254 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
20
|
-
83.149.9.216 - - [17/Sep/2014:07:13:47 +0000] "GET /presentations/logstash-monitorama-2013/images/1983_delorean_dmc-12-pic-38289.jpeg HTTP/1.1" 200 220562 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
21
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/simple-inputs-filters-outputs.jpg HTTP/1.1" 200 1168622 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
22
|
-
83.149.9.216 - - [17/Sep/2014:07:13:46 +0000] "GET /presentations/logstash-monitorama-2013/images/tiered-outputs-to-inputs.jpg HTTP/1.1" 200 1079983 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
23
|
-
83.149.9.216 - - [17/Sep/2014:07:13:53 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
|
24
|
-
24.236.252.67 - - [17/Sep/2014:07:14:10 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0"
|
25
|
-
93.114.45.13 - - [17/Sep/2014:07:14:32 +0000] "GET /articles/dynamic-dns-with-dhcp/ HTTP/1.1" 200 18848 "http://www.google.ro/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCwQFjAB&url=http%3A%2F%2Fwww.semicomplete.com%2Farticles%2Fdynamic-dns-with-dhcp%2F&ei=W88AU4n9HOq60QXbv4GwBg&usg=AFQjCNEF1X4Rs52UYQyLiySTQxa97ozM4g&bvm=bv.61535280,d.d2k" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
26
|
-
93.114.45.13 - - [17/Sep/2014:07:14:32 +0000] "GET /reset.css HTTP/1.1" 200 1015 "http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
27
|
-
93.114.45.13 - - [17/Sep/2014:07:14:33 +0000] "GET /style2.css HTTP/1.1" 200 4877 "http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
28
|
-
93.114.45.13 - - [17/Sep/2014:07:14:33 +0000] "GET /favicon.ico HTTP/1.1" 200 3638 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
29
|
-
93.114.45.13 - - [17/Sep/2014:07:14:33 +0000] "GET /images/jordan-80.png HTTP/1.1" 200 6146 "http://www.semicomplete.com/articles/dynamic-dns-with-dhcp/" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
30
|
-
93.114.45.13 - - [17/Sep/2014:07:14:33 +0000] "GET /images/web/2009/banner.png HTTP/1.1" 200 52315 "http://www.semicomplete.com/style2.css" "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"
|
@@ -1,10 +0,0 @@
|
|
1
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
2
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
3
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
4
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
5
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
6
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
7
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
8
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
9
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
10
|
-
{"_scroll_id":"xxx", "took":5, "timed_out":false, "_shards":{"total":15,"successful":15,"failed":0}, "hits":{"total":1000050, "max_score":1.0, "hits":[{"_index":"logstash2", "_type":"logs", "_id":"AmaqL7VuSWKF-F6N_Gz72g", "_score":1.0, "_source" : {"message":"foobar", "@version":"1", "@timestamp":"2014-05-19T21:08:39.000Z", "host":"colin-mbp13r"} } ] } }
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<164>Oct 26 15:19:25 1.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.3/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
2
|
-
<164>Oct 6 15:20:25 2.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.4/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
3
|
-
<164>Oct 1 15:21:25 3.2.3.4 %ASA-4-106023: Allow tcp src DRAC:10.1.2.5/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
4
|
-
<164>Oct 30 15:22:25 4.2.3.4 %ASA-4-106023: Allow tcp src DRAC:10.1.2.6/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
5
|
-
<164>Oct 26 15:19:25 1.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.3/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
6
|
-
<164>Oct 6 15:20:25 2.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.4/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
7
|
-
<164>Oct 1 15:21:25 3.2.3.4 %ASA-4-106023: Allow tcp src DRAC:10.1.2.5/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
8
|
-
<164>Oct 30 15:22:25 4.2.3.4 %ASA-4-106023: Allow tcp src DRAC:10.1.2.6/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
9
|
-
<164>Oct 26 15:19:25 1.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.3/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
10
|
-
<164>Oct 6 15:20:25 2.2.3.4 %ASA-4-106023: Deny udp src DRAC:10.1.2.4/43434 dst outside:192.168.0.1/53 by access-group "acl_drac" [0x0, 0x0]
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# format description:
|
2
|
-
# each test can be executed by either target duration using :time => N secs
|
3
|
-
# or by number of events with :events => N
|
4
|
-
#
|
5
|
-
#[
|
6
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 30},
|
7
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :events => 50000},
|
8
|
-
#]
|
9
|
-
#
|
10
|
-
[
|
11
|
-
{:name => "simple line in/out", :config => "config/simple.conf", :input => "input/simple_10.txt", :time => 120},
|
12
|
-
{:name => "simple line in/json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 120},
|
13
|
-
{:name => "json codec in/out", :config => "config/json_inout_codec.conf", :input => "input/json_medium.txt", :time => 120},
|
14
|
-
{:name => "line in/json filter/json out", :config => "config/json_inout_filter.conf", :input => "input/json_medium.txt", :time => 120},
|
15
|
-
{:name => "apache in/json out", :config => "config/simple.conf", :input => "input/apache_log.txt", :time => 120},
|
16
|
-
{:name => "apache in/grok codec/json out", :config => "config/simple_grok.conf", :input => "input/apache_log.txt", :time => 120},
|
17
|
-
{:name => "syslog in/json out", :config => "config/complex_syslog.conf", :input => "input/syslog_acl_10.txt", :time => 120},
|
18
|
-
]
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# format description:
|
2
|
-
# each test can be executed by either target duration using :time => N secs
|
3
|
-
# or by number of events with :events => N
|
4
|
-
#
|
5
|
-
#[
|
6
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 30},
|
7
|
-
# {:name => "simple json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :events => 50000},
|
8
|
-
#]
|
9
|
-
#
|
10
|
-
[
|
11
|
-
{:name => "simple line in/out", :config => "config/simple.conf", :input => "input/simple_10.txt", :time => 30},
|
12
|
-
{:name => "simple line in/json out", :config => "config/simple_json_out.conf", :input => "input/simple_10.txt", :time => 30},
|
13
|
-
{:name => "json codec in/out", :config => "config/json_inout_codec.conf", :input => "input/json_medium.txt", :time => 30},
|
14
|
-
{:name => "line in/json filter/json out", :config => "config/json_inout_filter.conf", :input => "input/json_medium.txt", :time => 30},
|
15
|
-
{:name => "apache in/json out", :config => "config/simple.conf", :input => "input/apache_log.txt", :time => 30},
|
16
|
-
{:name => "apache in/grok codec/json out", :config => "config/simple_grok.conf", :input => "input/apache_log.txt", :time => 30},
|
17
|
-
{:name => "syslog in/json out", :config => "config/complex_syslog.conf", :input => "input/syslog_acl_10.txt", :time => 30},
|
18
|
-
]
|
data/scripts/loader.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'elasticsearch'
|
4
|
-
require 'csv'
|
5
|
-
|
6
|
-
class Loader
|
7
|
-
|
8
|
-
def initialize(dir = "", debug = false)
|
9
|
-
@dir = dir
|
10
|
-
@debug = debug
|
11
|
-
end
|
12
|
-
|
13
|
-
def run
|
14
|
-
Dir.entries(@dir).each do |file|
|
15
|
-
absolute_path = File.join(@dir, file)
|
16
|
-
next if File.directory?(absolute_path)
|
17
|
-
load_file!(client, absolute_path)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def create_index
|
22
|
-
build_index client, index_config
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def client
|
28
|
-
@client ||= Elasticsearch::Client.new log: @debug
|
29
|
-
end
|
30
|
-
|
31
|
-
def load_file!(client, file)
|
32
|
-
props = scrap_props(file)
|
33
|
-
puts "file: #{file} props: #{props}" if @debug
|
34
|
-
CSV.foreach(file, :headers => true) do |row|
|
35
|
-
puts "#{row.class}, #{row.count}, #{row.headers}" if @debug
|
36
|
-
row.headers.each do |header|
|
37
|
-
next if row.headers.first == header
|
38
|
-
content = build_body(row, header, props)
|
39
|
-
id = "#{props[:time]}#{props[:class]}#{content["type"]}#{content["kpi"]}".hash
|
40
|
-
client.index(index: 'logstash-benchmark', type: 'bench', id: id, body: content) rescue puts "failure with #{row}"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
puts if @debug
|
44
|
-
end
|
45
|
-
|
46
|
-
def build_body(row, header, props)
|
47
|
-
type = row[0]
|
48
|
-
kpi = header
|
49
|
-
{
|
50
|
-
"class" => props[:class],
|
51
|
-
"type" => type,
|
52
|
-
"ts" => timestamp(props[:time]),
|
53
|
-
"kpi" => kpi,
|
54
|
-
"times" => row[header].to_i,
|
55
|
-
"_source" => "script"
|
56
|
-
}
|
57
|
-
end
|
58
|
-
|
59
|
-
def timestamp(time)
|
60
|
-
Time.at(time.to_i).strftime("%Y-%m-%dT%H:%M:%S.%3N%z")
|
61
|
-
end
|
62
|
-
|
63
|
-
def scrap_props(file)
|
64
|
-
match = /-(\d*.\d*)_(\d*).csv/.match(file)
|
65
|
-
{:class => match[1], :time => match[2] }
|
66
|
-
end
|
67
|
-
|
68
|
-
def build_index(client, params)
|
69
|
-
client.indices.create index: 'logstash-benchmark', body: params
|
70
|
-
end
|
71
|
-
|
72
|
-
def index_config
|
73
|
-
{:settings => index_settings, :mappings => index_mappings }
|
74
|
-
end
|
75
|
-
|
76
|
-
def index_settings
|
77
|
-
{ analysis: {analyzer: {
|
78
|
-
label: {
|
79
|
-
stopwords: '_none_',
|
80
|
-
type: 'standard'
|
81
|
-
}
|
82
|
-
}}}
|
83
|
-
end
|
84
|
-
|
85
|
-
def index_mappings
|
86
|
-
props = { "name" => { "type" => "string" },
|
87
|
-
"class" => { "type" => "string" },
|
88
|
-
"type" => { "type" => "string", "index" => "not_analyzed" },
|
89
|
-
"kpi" => { "type" => "string", "index" => "not_analyzed" },
|
90
|
-
"ts" => { "type" => "date", "format" => "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "index" => "analyzed" },
|
91
|
-
"times" => { "type" => "integer" } }
|
92
|
-
{ 'bench' => { '_source' => { 'enabled' => true }, 'properties' => props } }
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
@debug = !!ENV['DEBUG']
|
98
|
-
|
99
|
-
## main function
|
100
|
-
if __FILE__ == $0
|
101
|
-
mode = ARGV[0]
|
102
|
-
if "i" == mode
|
103
|
-
puts "Loading the index definition"
|
104
|
-
Loader.new.create_index
|
105
|
-
puts "done"
|
106
|
-
elsif "m" == mode
|
107
|
-
puts "Loading data form the directory"
|
108
|
-
loader = Loader.new(ARGV[1], @debug)
|
109
|
-
loader.run
|
110
|
-
puts "done"
|
111
|
-
else
|
112
|
-
raise Exception.new("IllegalArgument: USAGE: loader [m|i] [path]")
|
113
|
-
end
|
114
|
-
end
|
data/scripts/setup.sh
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
4
|
-
|
5
|
-
TODAY=`date +%s`
|
6
|
-
|
7
|
-
VERSIONS=( 1.4.2 1.5.0 1.5.1 1.5.2 )
|
8
|
-
DEST_DIR="workspace"
|
9
|
-
|
10
|
-
mkdir -p $DEST_DIR
|
11
|
-
|
12
|
-
## Download released versions.
|
13
|
-
|
14
|
-
for VERSION in "${VERSIONS[@]}"
|
15
|
-
do
|
16
|
-
|
17
|
-
FILENAME="logstash-$VERSION.tar.gz"
|
18
|
-
SOURCE_FILE="$DEST_DIR/$FILENAME"
|
19
|
-
DOWNLOAD_URL="https://download.elasticsearch.org/logstash/logstash/$FILENAME"
|
20
|
-
|
21
|
-
if [ ! -f $SOURCE_FILE ]; then
|
22
|
-
echo "Downloading $DOWNLOAD_URL"
|
23
|
-
wget $DOWNLOAD_URL -O $SOURCE_FILE
|
24
|
-
tar -xvzf $SOURCE_FILE -C $DEST_DIR
|
25
|
-
fi
|
26
|
-
done
|
27
|
-
|
28
|
-
|
29
|
-
## Bootstrapping the environment
|
30
|
-
rvm use --create jruby-1.7.20@logstash-perfm
|
31
|
-
gem install logstash-perftool
|
32
|
-
|
33
|
-
cd $DEST_DIR
|
34
|
-
## Run the report for each download package
|
35
|
-
for VERSION in "${VERSIONS[@]}"
|
36
|
-
do
|
37
|
-
cd "logstash-$VERSION"
|
38
|
-
rvm use jruby-1.7.20@logstash-perfm
|
39
|
-
lsperfm > "../logstash-$VERSION-$TODAY.log"
|
40
|
-
cd ..
|
41
|
-
done
|
42
|
-
|
43
|
-
## Setup the current codebase
|
44
|
-
rm -rf "logstash"
|
45
|
-
git clone git@github.com:elastic/logstash.git
|
46
|
-
echo "jruby-1.7.20" > "logstash/.ruby-version"
|
47
|
-
echo "logstash-perfm" > "logstash/.ruby-gemset"
|
48
|
-
|
49
|
-
cd logstash
|
50
|
-
|
51
|
-
## Running the benchmarks for each logstash repository branch
|
52
|
-
## of interest.
|
53
|
-
BRANCHES=( master 1.5 )
|
54
|
-
for BRANCH in "${BRANCHES[@]}"
|
55
|
-
do
|
56
|
-
git checkout Gemfile
|
57
|
-
git checkout Gemfile.jruby-1.9.lock
|
58
|
-
git checkout $BRANCH
|
59
|
-
rm -rf vendor
|
60
|
-
rake bootstrap
|
61
|
-
lsperfm-deps
|
62
|
-
lsperfm > "../logstash-branch-$BRANCH-$TODAY.log"
|
63
|
-
done
|
data/spec/fixtures/config.yml
DELETED
data/spec/fixtures/simple.conf
DELETED
data/spec/fixtures/simple_10.txt
DELETED
data/suite.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require_relative 'run'
|
4
|
-
|
5
|
-
RUNNER = File.join(File.expand_path(File.dirname(__FILE__)), "run.rb")
|
6
|
-
BASE_DIR = File.expand_path(File.dirname(__FILE__))
|
7
|
-
|
8
|
-
## script main
|
9
|
-
|
10
|
-
if ARGV.size < 1 or ARGV.size > 2
|
11
|
-
$stderr.puts("usage: ruby suite.rb [suite file] [logstash path]")
|
12
|
-
exit(1)
|
13
|
-
end
|
14
|
-
|
15
|
-
@debug = !!ENV["DEBUG"]
|
16
|
-
|
17
|
-
logstash_home = ENV['LOGSTASH_HOME'] || 'logstash'
|
18
|
-
install_path = ARGV.size > 1 ? ARGV[1] : logstash_home
|
19
|
-
|
20
|
-
tests = eval(IO.read(ARGV[0]))
|
21
|
-
lines = ["name, #{Runner.headers.join(',')}"]
|
22
|
-
first = true
|
23
|
-
|
24
|
-
reporter = Thread.new do
|
25
|
-
loop do
|
26
|
-
$stderr.print "."
|
27
|
-
sleep 1
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
tests.each do |test|
|
32
|
-
|
33
|
-
events = test[:events].to_i # total number of events to feed, independant of input file size
|
34
|
-
time = test[:time].to_i
|
35
|
-
config = File.join(BASE_DIR, test[:config])
|
36
|
-
input = File.join(BASE_DIR, test[:input])
|
37
|
-
|
38
|
-
runner = Runner.new(config, @debug, install_path)
|
39
|
-
p, elaspsed, events_count = runner.run(events, time, runner.read_input_file(input))
|
40
|
-
|
41
|
-
lines << "#{test[:name]}, #{"%.2f" % elaspsed}, #{events_count}, #{"%.0f" % (events_count / elaspsed)},#{p.last}, #{"%.0f" % (p.reduce(:+) / p.size)}"
|
42
|
-
first = false
|
43
|
-
end
|
44
|
-
|
45
|
-
reporter.kill
|
46
|
-
puts lines.join("\n")
|