request-log-analyzer 1.13.3 → 1.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +400 -0
- data/CONTRIBUTING.rdoc +35 -0
- data/README.rdoc +4 -5
- data/lib/request_log_analyzer/file_format/rails3.rb +14 -0
- data/lib/request_log_analyzer/request.rb +1 -1
- data/lib/request_log_analyzer/version.rb +1 -1
- data/request-log-analyzer.gemspec +1 -1
- data/spec/unit/file_format/rails3_format_spec.rb +6 -0
- metadata +29 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23fe3f79582c68c9801c113acb5dc21bc592ed12
|
4
|
+
data.tar.gz: 59b25b9fba8c5e0bcefa3a1b36c2a6376fd3d0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 771042e2e0cc263abb9586b4dcdf641268df4ebe9078d404a5cdf71f4281a77a072ae744bf8735b7950e1877e67e7122079ee1489361c39d16c03177cbbd7adb
|
7
|
+
data.tar.gz: fab44665ba403c12eb28db65fe41cdd13f2615550df4af3caec123f436aab2814291389fb5ec2a9ea9d8f3edf8eb53fc4fea253aee874d661633ed72a2d03b03
|
data/CHANGELOG.rdoc
ADDED
@@ -0,0 +1,400 @@
|
|
1
|
+
= Changelog
|
2
|
+
|
3
|
+
This file keeps track of changes in the different request-log-analyzer releases. When creating a pull request,
|
4
|
+
please add an entry to the "Not yet released" section in this document.
|
5
|
+
|
6
|
+
== Not yet released
|
7
|
+
|
8
|
+
* Nothing yet!
|
9
|
+
|
10
|
+
== Request-log-analyzer 1.13 release cycle
|
11
|
+
|
12
|
+
=== Version 1.13.4
|
13
|
+
|
14
|
+
* Catch SyntaxErrors when eval'ing lines.
|
15
|
+
* Scrub parameter with file upload line in Rails requests, so it will parse successfully. (Michael Stark)
|
16
|
+
|
17
|
+
=== Version 1.13.3
|
18
|
+
|
19
|
+
* Allow more flexible Apache user strings
|
20
|
+
* Rspec 3
|
21
|
+
* Reintroduce class attribute inheritance to keep writing your own custom analyser based on an existing one simple.
|
22
|
+
* Rubucop cleanup
|
23
|
+
|
24
|
+
=== Version 1.13.2
|
25
|
+
|
26
|
+
=== Version 1.13.1
|
27
|
+
|
28
|
+
* Adapt Delayed Job 4 Log format changes (Michael Stark)
|
29
|
+
* Catch all errors when using eval (temporary workaround to prevent crashing)
|
30
|
+
* Fix Rubinus in Travis config.
|
31
|
+
* Enable the sender name and email address to be specified on the command line (Joshua Pettett)
|
32
|
+
|
33
|
+
=== Version 1.13.0
|
34
|
+
|
35
|
+
* Dropped Ruby 1.8 support
|
36
|
+
* Dropped ActiveRecord 2 support
|
37
|
+
* Removed OrdereredHash
|
38
|
+
* Removed force_encoding check.
|
39
|
+
|
40
|
+
== Request-log-analyzer 1.12 release cycle
|
41
|
+
|
42
|
+
=== Version 1.12.11
|
43
|
+
|
44
|
+
* Millisecond measuring units when measurements are under 1 second
|
45
|
+
* Added specific class to html report
|
46
|
+
* Allow floats for durations when using the %T directive in Apache format
|
47
|
+
* Rubinius Fixes
|
48
|
+
|
49
|
+
=== Version 1.12.10
|
50
|
+
|
51
|
+
* Apache vhost combined now supported
|
52
|
+
* Removed old blog from readme
|
53
|
+
* S3 format parser more permissive, as it rejected real log files
|
54
|
+
* Redid Travis build environment & requirements
|
55
|
+
* Added MIT license to gemspec
|
56
|
+
|
57
|
+
=== Version 1.12.9
|
58
|
+
|
59
|
+
* Switched to new NGINX apache default (combined)
|
60
|
+
* Enable database testing on Travis
|
61
|
+
* Use bundler gem tasks for gemification
|
62
|
+
|
63
|
+
=== Version 1.12.8
|
64
|
+
|
65
|
+
* Rails 3 routing errors are now reported on.
|
66
|
+
|
67
|
+
=== Version 1.12.7
|
68
|
+
|
69
|
+
* Delayed Job 3 format now supported
|
70
|
+
|
71
|
+
=== Version 1.12.6
|
72
|
+
|
73
|
+
* Added NGINX support
|
74
|
+
* Analyse & Report Rails3 partials
|
75
|
+
* Added directories parsing support
|
76
|
+
|
77
|
+
=== Version 1.12.5
|
78
|
+
|
79
|
+
* Filename is now displayed in the header of the output
|
80
|
+
* Added orderedhash class for Rubinius support
|
81
|
+
* Fixed a number of Travis issues
|
82
|
+
|
83
|
+
=== Version 1.12.4
|
84
|
+
|
85
|
+
* Fixed version number being off.
|
86
|
+
* Rake tasks are now Rails 2 & 3 compatible.
|
87
|
+
* Ftools is replaced with fileutils.
|
88
|
+
|
89
|
+
=== Version 1.12.3
|
90
|
+
|
91
|
+
* Cleaned up internal API for nices Ruby integration.
|
92
|
+
* Fixed small typo.
|
93
|
+
* Replaced relative path reference to database_console_init with standard reference
|
94
|
+
|
95
|
+
=== Version 1.12.2
|
96
|
+
|
97
|
+
* Removed Encoding.default_external as it was unnecessary and caused problems with Ruby 1.9.3-head.
|
98
|
+
|
99
|
+
=== Version 1.12.1
|
100
|
+
|
101
|
+
* Database inserter now working for ActiveRecord 3: NOTE! The minimal ActiveRecord version required is 3!
|
102
|
+
* Travis CI build support (http://travis-ci.org/#!/wvanbergen/request-log-analyzer)
|
103
|
+
* Standard error and out are now cleaned up (#107)
|
104
|
+
|
105
|
+
=== Version 1.12.0
|
106
|
+
|
107
|
+
* Loading the database console now works again.
|
108
|
+
|
109
|
+
== Request-log-analyzer 1.11 release cycle
|
110
|
+
|
111
|
+
=== Version 1.11.0
|
112
|
+
|
113
|
+
*Important:* The @--gets-memory-protection@ command line switch is gone. Ruby 1.9 offers this functionality without a performance penalty. If you want to keep using this option in Ruby 1.8, please do not upgrade to this version or copy paste the mixin.
|
114
|
+
|
115
|
+
Also, removed some half-finished features that were not in a usable state and are not going to be further developed, like using a database as a request source and the "FancyHTML" output format.
|
116
|
+
|
117
|
+
* The HAProxy file format now supports more old versions.
|
118
|
+
* The Rails 3 format now reads "parameters" lines.
|
119
|
+
* Better parsing of hostnames and IP addresses, fixing some edge cases in all file formats that use these.
|
120
|
+
* Change @autoload@ magic to use regular @require@ to make the source code more understandable.
|
121
|
+
* File format specs are refactored to be more readable.
|
122
|
+
|
123
|
+
PostgreSQL format bug: we found that for some log files, about 50% of all queries will not get parsed. We are working on a fix for the file format; in the mean time you can still use it to get a feel of the performance.
|
124
|
+
|
125
|
+
== Request-log-analyzer 1.10 release cycle
|
126
|
+
|
127
|
+
=== Version 1.10.1
|
128
|
+
|
129
|
+
* Small bugfix when using custom file formats in Ruby 1.9.2.
|
130
|
+
* Small fix for Rails 3 processing line edge case.
|
131
|
+
* Set up CI testing framework. Request-log-analyzer is now tested on Ruby 1.8.7, 1.9.2 and Ruby enterprise edition.
|
132
|
+
|
133
|
+
=== Version 1.10.0
|
134
|
+
|
135
|
+
* Add support for the W3C log format. @--format w3c@
|
136
|
+
* Add support for HAProxy logs. @--format haproxy@
|
137
|
+
* Add support for providing the unit used for the Apache %D directive. Default: @%D@, or @%{micro}D@, in which case the values will be interpreted as microseconds. @%{milli}D@ will interpret them as milliseconds instead. (@%T@ interprets the value as seconds.)
|
138
|
+
* Fixed parsing of Rails 3 Completed lines when another duration is specified (ex: Sphinx)
|
139
|
+
|
140
|
+
== Request-log-analyzer 1.9 release cycle
|
141
|
+
|
142
|
+
=== Version 1.9.10
|
143
|
+
|
144
|
+
* PostgreSQL format fixes
|
145
|
+
* Fix in loading custom output formats from the command line.
|
146
|
+
|
147
|
+
=== Version 1.9.9
|
148
|
+
|
149
|
+
* Added parsing of object instantiation counts to Oink file format.
|
150
|
+
|
151
|
+
=== Version 1.9.8
|
152
|
+
|
153
|
+
* Fixed issue in Delayed::Job log parser when using multiple workers.
|
154
|
+
* Added some stuff to the YAML result export.
|
155
|
+
|
156
|
+
=== Version 1.9.7
|
157
|
+
|
158
|
+
* Fixed a bug in parsing rails3's started line for Ruby 1.9.2 Time#to_s
|
159
|
+
* Added benchmarks of different rubies
|
160
|
+
|
161
|
+
=== Version 1.9.6
|
162
|
+
|
163
|
+
* Small improvements to the Rails 3 file format.
|
164
|
+
|
165
|
+
=== Version 1.9.5
|
166
|
+
|
167
|
+
* Fixed a issue with the --select command line option not being parsed correctly.
|
168
|
+
|
169
|
+
=== Version 1.9.4
|
170
|
+
|
171
|
+
* Small fixes in both the Rails 2 and Rails 3 file formats.
|
172
|
+
|
173
|
+
=== Version 1.9.3
|
174
|
+
|
175
|
+
* Fixed a small date handling issue in Rails 3 file format.
|
176
|
+
|
177
|
+
=== Version 1.9.2
|
178
|
+
|
179
|
+
* Fixed an issue with the Rails 2 file format when ActiveRecord is disabled.
|
180
|
+
|
181
|
+
=== Version 1.9.1
|
182
|
+
|
183
|
+
* Fixed format auto-detection issue that caused a Rails log file to show up as an Oink file.
|
184
|
+
|
185
|
+
=== Version 1.9.0
|
186
|
+
|
187
|
+
* Added 90-percentile interval to numerical reports.
|
188
|
+
* Some fixes for the Rails 3 file format
|
189
|
+
|
190
|
+
== Request-log-analyzer 1.8 release cycle
|
191
|
+
|
192
|
+
=== Version 1.8.1
|
193
|
+
|
194
|
+
* Ruby 1.9.2 and Rails 3 compatibility fixes
|
195
|
+
* Rails 3 log format improvements
|
196
|
+
* Added log splitting on PID to Rails rake task @rake rla:split@ (Issue 56).
|
197
|
+
* Several smaller bugfixes
|
198
|
+
|
199
|
+
=== Version 1.8.0
|
200
|
+
|
201
|
+
* Added Oink support for Rails.
|
202
|
+
* Added @--mailsubject@ option (Issue 51).
|
203
|
+
* Fixed require exception on empty rails folder
|
204
|
+
|
205
|
+
== Request-log-analyzer 1.7 release cycle
|
206
|
+
|
207
|
+
=== Version 1.7.0
|
208
|
+
|
209
|
+
* @--silent@ option implemented. No output is given when this option is used. Ideal for cron job usage (Issue 46).
|
210
|
+
* @--gets-memory-protection@ Includes a mixin to prevent Ruby gets from using huge amounts of memory when extremely long lines are encountered in a log (Issue 47). Please note that this option will suffer a 10% performance hit.
|
211
|
+
|
212
|
+
== Request-log-analyzer 1.6 release cycle
|
213
|
+
|
214
|
+
=== Version 1.6.4
|
215
|
+
|
216
|
+
* Fixed a bug that disallowed line definition names that are also methods names of the Object class.
|
217
|
+
|
218
|
+
=== Version 1.6.3
|
219
|
+
|
220
|
+
* Initial support for Rails 3 logs. Add @--format rails3@ to your command line if auto-detection fails. <br />
|
221
|
+
<em>Note:</em> The log format has changed since the release of the Rails 3 beta. Only the HEAD version of Rails 3 is supported by request-log-analyzer.
|
222
|
+
* Fixed a bug in the [[Amazon S3 access log]] parser.
|
223
|
+
* Improved the graphs when using the @FancyHTML@ output.
|
224
|
+
* Added a nicer API to define capture values in a file format.
|
225
|
+
|
226
|
+
=== Version 1.6.2
|
227
|
+
|
228
|
+
* Rails 1.9 compatibility fixes related to string encodings.
|
229
|
+
|
230
|
+
=== Version 1.6.1
|
231
|
+
|
232
|
+
* Fixed a bug in the request database schema creation.
|
233
|
+
* Minor bugfixes.
|
234
|
+
|
235
|
+
=== Version 1.6.0
|
236
|
+
|
237
|
+
* [[PostgreSQL query log]] support. (Add @--format postgresql@ to your command if auto-detection fails.) <br />
|
238
|
+
We only had a limited sample of PostgreSQL log to implement the file format.Please support us and send in a fragment of your PostgreSQL query log file!
|
239
|
+
* Fixed Rails action cache hit detection for newer Rails versions.
|
240
|
+
|
241
|
+
== Request-log-analyzer 1.5 release cycle
|
242
|
+
|
243
|
+
=== Version 1.5.4
|
244
|
+
|
245
|
+
* Added support for [[DelayedJob log]] files. (Add @--format delayed_job@ to your command if auto-detection fails.)
|
246
|
+
* Fixed Rails 3 ActiveRecord deprecation notice.
|
247
|
+
|
248
|
+
=== Version 1.5.3
|
249
|
+
|
250
|
+
* Fixed a small bug in the Rails development file format report.
|
251
|
+
* Fixed the @:multiple => true@ option for frequency trackers
|
252
|
+
* Added a beginning for a new output format: FancyHTML, which includes charts using the Google charts API. Add @--output FancyHTML@ to your command line to activate it.
|
253
|
+
* Improved Sinatra/Rack format auto-detection.
|
254
|
+
* Extracted regular expressions for common log fragments, like IP addresses and timestamps, to a shared module.
|
255
|
+
|
256
|
+
=== Version 1.5.2
|
257
|
+
|
258
|
+
* Support parsing IPv6 IP address as well. Thanks to "dissemble":http://github.com/dissemble for contributing the patch.
|
259
|
+
* JRuby related fixes
|
260
|
+
|
261
|
+
=== Version 1.5.1
|
262
|
+
|
263
|
+
* Fixed a crasher bug in the HTML output of traffic reports.
|
264
|
+
|
265
|
+
=== Version 1.5.0
|
266
|
+
|
267
|
+
* Added file format autodetection: in most cases, providing the @--format@ parameter is no longer needed to select the correct file format. However, it is still possible to explicitly set the format if autodetection fails.
|
268
|
+
* Added a [[MySQL slow query log]] parser (@--format mysql@). <br />
|
269
|
+
Thanks "Bart Zonneveld":http://github.com/bartzon for contributing this functionality.
|
270
|
+
* Mail host now configurable. Use @--mailhost <server>@ to specify this
|
271
|
+
* Added specs to test mailing functionality using a mock SMTP server (mailtrap)
|
272
|
+
|
273
|
+
== Request-log-analyzer 1.4 release cycle
|
274
|
+
|
275
|
+
=== Version 1.4.2
|
276
|
+
|
277
|
+
* Added correct content-type to emails sent via the @--mail@ option.
|
278
|
+
|
279
|
+
=== Version 1.4.1
|
280
|
+
|
281
|
+
* Fixed @--mail@ command line option which was broken since version 1.4.0.
|
282
|
+
* Added Scout & Munin plugin integration tests
|
283
|
+
|
284
|
+
=== Version 1.4.0
|
285
|
+
|
286
|
+
* Initial version of request-log-analyzer API.
|
287
|
+
* Added standard deviation to duration and traffic reports.
|
288
|
+
* Added @--report-amount <n>@ to define the number of entries in the table in the report. Use @all@ to specify that all entries should be included. The default value is 20
|
289
|
+
* Added @--report-sort <sortings>@ options to specify how the resulting duration and traffic tables should be sorted. You can specify multiple sort fields using a comma separated list, which results in multiple tables. Supported sortings are @sum@, @mean@, @stddev@ and @hits@. The default value is @sum,mean@.
|
290
|
+
* Restructured the [[Rails request log]] parser to be more flexible about what lines to parse, using the @--rails-format <lines>@ command line switch.
|
291
|
+
** @--rails-format minimal@ will only parse _processing_ and _completed_ lines.
|
292
|
+
** @--rails-format production@ will parse exceptions and cache hits besides the minimal lines.
|
293
|
+
** @--rails-format development@ will also parse SQL queries and template renderings
|
294
|
+
** @--rails-format all@ will parse every known line type.
|
295
|
+
** @--rails-format minimal,failure@ will parse the minimal lines and exceptions. Use a comma-separated list like this. to define your own line set.
|
296
|
+
* Significantly improved the test coverage of the Rails log format.
|
297
|
+
|
298
|
+
== Request-log-analyzer 1.3 release cycle
|
299
|
+
|
300
|
+
=== Version 1.3.7
|
301
|
+
|
302
|
+
* Fixed a crasher bug when parsing compressed files.
|
303
|
+
* Speed optimizations by enabling teaser checks for lines.
|
304
|
+
|
305
|
+
=== Version 1.3.6
|
306
|
+
|
307
|
+
* Speed optimizations to improve parsing performance of frequently called methods, i.e. @Tracker#should_update@, @Request#convert_value@, @Request#convert_timestamp@, @Request#convert_traffic@ and @Request#convert_duration@.
|
308
|
+
* Tweaked all file formats for increased performance
|
309
|
+
* Cleaned up and simplified some old code.
|
310
|
+
|
311
|
+
=== Version 1.3.5
|
312
|
+
|
313
|
+
* Added statistics about data traffic for the file formats that contain this information (Apache, Amazon S3, Rack)
|
314
|
+
* Added support for Rack CommonLogger logs (@--format rack@).
|
315
|
+
* Added "agent" and "referer" Apache log format constants.
|
316
|
+
* Improved request duration parsing (%D directive) from [[Apache access log]] files.
|
317
|
+
* Fixed a bug in the database inserter that caused tables to be created with wrong fields.
|
318
|
+
|
319
|
+
=== Version 1.3.4
|
320
|
+
|
321
|
+
* Added [[Amazon S3 access log]] parser. Add @--format amazon_s3@ to you command line to use it. S3 access logs are disabled by default. See "the S3 documentation on server logging":http://docs.amazonwebservices.com/AmazonS3/latest/index.html?ServerLogs.html for more information to enable it.
|
322
|
+
|
323
|
+
=== Version 1.3.3
|
324
|
+
|
325
|
+
_Retracted release_
|
326
|
+
|
327
|
+
=== Version 1.3.2
|
328
|
+
|
329
|
+
* Tweaking to increase performance significantly.
|
330
|
+
* Added a @--no-progress@ command line switch to disable the progress bar parsing for an additional speed improvement.
|
331
|
+
|
332
|
+
=== Version 1.3.1
|
333
|
+
|
334
|
+
* E-mail option to automatically send you reports: add <code>--mail my@address.com</code> to your command line.
|
335
|
+
* Allow other database connections than SQLite3 by passing a connection string to the @--database@ command line option. Examples:
|
336
|
+
** SQLite3 file database: @--database filename.db@ (as before)
|
337
|
+
** Connection URI: <code>--database postgresql://rla:rla@localhost/requests</code>
|
338
|
+
** ODBC-style: @--database adapter=mysql;username=root;host=localhost;database=requests@
|
339
|
+
** Memory database: @--database adapter=sqlite3;database=:memory:@
|
340
|
+
* Keep the previous database by default, pass the @--reset-database@ option to clear the database before parsing.
|
341
|
+
* Added an IRB console to inspect a request database just like Rails's @script/console@. Run with <br />@request-log-analyzer console -d <connection string>@
|
342
|
+
* Fixed some require paths that were causing problems.
|
343
|
+
|
344
|
+
=== Version 1.3.0
|
345
|
+
|
346
|
+
_Retracted release_
|
347
|
+
|
348
|
+
== Request-log-analyzer 1.2 release cycle
|
349
|
+
|
350
|
+
=== Version 1.2.9
|
351
|
+
|
352
|
+
* Improved [[Apache access log]] format. Can now handle any kind of "Apache access log file format":http://httpd.apache.org/docs/1.3/mod/mod_log_config.html by providing the @--apache-format <format>@ command line argument.
|
353
|
+
* Allow @FileFormats@ to be constructed dynamically (used for the Apache format implementation).
|
354
|
+
* Refactored parameter passing during parsing to allow for more flexibility.
|
355
|
+
|
356
|
+
=== Version 1.2.8
|
357
|
+
|
358
|
+
_Retracted release_
|
359
|
+
|
360
|
+
=== Version 1.2.7
|
361
|
+
|
362
|
+
* Added [[Apache access log]] parser. To use, add @--format apache@ to your command line invocation
|
363
|
+
* Make the release script send the gem to RubyForge as well.
|
364
|
+
|
365
|
+
=== Version 1.2.6
|
366
|
+
|
367
|
+
* New, more robust gem release script using the ruby-git gem.
|
368
|
+
* Updated outdated information in the gemspec file
|
369
|
+
|
370
|
+
=== Version 1.2.5
|
371
|
+
|
372
|
+
* Improved Merb log format parser
|
373
|
+
|
374
|
+
=== Version 1.2.4
|
375
|
+
|
376
|
+
* More robust handling of database connections in database inserter.
|
377
|
+
|
378
|
+
=== Version 1.2.3
|
379
|
+
|
380
|
+
* Refactored database functions
|
381
|
+
* Cleaned up specs and tried some heckle
|
382
|
+
* Interrupts are handled more gracefully
|
383
|
+
* Moved munin tracker to a "separate Github project":http://github.com/barttenbrinke/munin-plugins-rails/
|
384
|
+
|
385
|
+
=== Version 1.2.2
|
386
|
+
|
387
|
+
_Retracted release_
|
388
|
+
|
389
|
+
=== Version 1.2.1
|
390
|
+
|
391
|
+
* Compressed logfile support
|
392
|
+
* Parsable YAML results as output (use @--dump <filename>@ command line option )
|
393
|
+
* "Full Rdoc documentation":http://wvanbergen.github.com/request-log-analyzer
|
394
|
+
* Introduced [[Changelog]]
|
395
|
+
* Updated rails rake tasks
|
396
|
+
|
397
|
+
=== Version 1.2.0
|
398
|
+
|
399
|
+
* Ruby 1.9 support
|
400
|
+
* Rcov coverage (use @rake spec:rcov@ to generate the coverage report)
|
data/CONTRIBUTING.rdoc
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
= Contributing to request-log-analyzer
|
2
|
+
|
3
|
+
If you would like to help out, fork the project! If you want me to merge back the changes, please send a pull request. If you have any questions regarding helping out or the codebase, contact us.
|
4
|
+
|
5
|
+
* Look at the issue tracker for things to work on: http://github.com/wvanbergen/request-log-analyzer/issues
|
6
|
+
* DESIGN.rdoc contains some general information about how the project is set up internally. This may help you get started.
|
7
|
+
* RDoc documentation can be found at http://rdoc.info/projects/wvanbergen/request-log-analyzer
|
8
|
+
* See CHANGELOG.rdoc to see what changed over the different releases of request-log-analyzer.
|
9
|
+
|
10
|
+
We really like to receive patches and we will gladly accept them from anybody regardless of race, gender, nationality, sexual orientation, coding ability or species.
|
11
|
+
|
12
|
+
== Getting your changes accepted
|
13
|
+
|
14
|
+
We care about the maintainability and software quality of this project. Because of this, we code review all changes that go in. Please make sure your pull requests conform to the following requirements:
|
15
|
+
|
16
|
+
- <b>Conform to</b> the current <b>coding style</b>. The style is not written down or defined explicitly, but comparing your code with the surrounding lines will give you a ballpark impression.
|
17
|
+
- Make sure the <b>documentation</b> is up to date for the methods you add or change. We use <b>Yardoc</b> syntax.
|
18
|
+
- Always <b>add specs</b> for any new functionality. Otherwise, we may unintentionally break it in the future.
|
19
|
+
- Always make sure that all the specs pass for all the Ruby versions we report. You can do this yourself using your ruby version manager of choice, or rely on Travis CI to do it for you. We will not merge pull requests for which Travis CI is failing.
|
20
|
+
- Do not change the <tt>RequestLogAnalyzer::VERSION</tt> constant.
|
21
|
+
- Add an entry to <tt>CHANGELOG.rdoc</tt> describing your change in one sentence.
|
22
|
+
- Make sure you're not including any <b>hard tabs</b> or <b>trailing spaces</b> in your changes. This drives me MAD!
|
23
|
+
|
24
|
+
Some final notes:
|
25
|
+
|
26
|
+
- Inform us that you're working on something. This way we can keep track on what is happening and we can assist if needed.
|
27
|
+
- Don't hesitate to ask us any questions or advice.
|
28
|
+
- Don't hesitate to tell us if we are not being helpful.
|
29
|
+
|
30
|
+
== Release process
|
31
|
+
|
32
|
+
- Update <tt>RequestLogAnalyzer::VERSION</tt> constant.
|
33
|
+
- Update <tt>CHANGELOG.rdoc</tt> by moving the items in the unreleased changes sections to a section for the new version.
|
34
|
+
- Commit the changes.
|
35
|
+
- Run <tt>rake release</tt>
|
data/README.rdoc
CHANGED
@@ -13,13 +13,11 @@ See the project wiki at http://github.com/wvanbergen/request-log-analyzer/wiki f
|
|
13
13
|
|
14
14
|
== Installation & basic usage
|
15
15
|
|
16
|
-
Install request-log-analyzer as a Ruby gem (you might need to run this command
|
17
|
-
as root by prepending +sudo+ to it):
|
16
|
+
Install request-log-analyzer as a Ruby gem (you might need to run this command as root by prepending +sudo+ to it):
|
18
17
|
|
19
18
|
$ gem install request-log-analyzer
|
20
19
|
|
21
|
-
To analyze a Rails log file and produce a performance report, run
|
22
|
-
request-log-analyzer like this:
|
20
|
+
To analyze a Rails log file and produce a performance report, run request-log-analyzer like this:
|
23
21
|
|
24
22
|
$ request-log-analyzer log/production.log
|
25
23
|
|
@@ -45,4 +43,5 @@ Bergen (willem@railsdoctors.com) or Bart ten Brinke (bart@railsdoctors.com).
|
|
45
43
|
|
46
44
|
* Project wiki at GitHub: http://github.com/wvanbergen/request-log-analyzer/wiki
|
47
45
|
* Issue tracker at GitHub: http://github.com/wvanbergen/request-log-analyzer/issues
|
48
|
-
*
|
46
|
+
* The Railsdoctors homepage: http://railsdoctors.com
|
47
|
+
* Check out CONTRIBUTING.rdoc if you want to help out on this project.
|
@@ -127,6 +127,20 @@ module RequestLogAnalyzer::FileFormat
|
|
127
127
|
time_as_str.to_i
|
128
128
|
end
|
129
129
|
end
|
130
|
+
|
131
|
+
|
132
|
+
def sanitize_parameters(parameter_string)
|
133
|
+
parameter_string.force_encoding("UTF-8")
|
134
|
+
.gsub(/#</, '"')
|
135
|
+
.gsub(/>, \"/, '", "')
|
136
|
+
.gsub(/>>}/, '\""}') # #< ... >>}
|
137
|
+
.gsub(/>>, \"/, '\"", "') # #< ... >>, "
|
138
|
+
.gsub(/", @/, '\", @') # #< ... @content_type="image/jpeg", @ ... >>
|
139
|
+
.gsub(/="/, '=\"') # #< ... filename="IMG_2228.JPG" Content-Type: image/jpeg", ... >>
|
140
|
+
.gsub(/=\\", "/, '=", "') # redo "...hSMjag0w=\\",
|
141
|
+
.gsub(/=\\"}/, '="}') # redo "...hSMjag0w=\\"}
|
142
|
+
.gsub(/\\0/, '')
|
143
|
+
end
|
130
144
|
end
|
131
145
|
end
|
132
146
|
end
|
@@ -58,7 +58,7 @@ module RequestLogAnalyzer
|
|
58
58
|
# Converts :eval field, which should evaluate to a hash.
|
59
59
|
def convert_eval(value, _capture_definition)
|
60
60
|
eval(sanitize_parameters(value)).reduce({}) { |h, (k, v)| h[k.to_sym] = v; h }
|
61
|
-
rescue
|
61
|
+
rescue StandardError, SyntaxError
|
62
62
|
nil
|
63
63
|
end
|
64
64
|
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |gem|
|
|
26
26
|
eos
|
27
27
|
|
28
28
|
gem.rdoc_options << '--title' << gem.name << '--main' << 'README.rdoc' << '--line-numbers' << '--inline-source'
|
29
|
-
gem.extra_rdoc_files = ['README.rdoc']
|
29
|
+
gem.extra_rdoc_files = ['README.rdoc', 'DESIGN.rdoc', 'CONTRIBUTING.rdoc', 'CHANGELOG.rdoc', 'LICENSE']
|
30
30
|
|
31
31
|
gem.requirements << "To use the database inserter, ActiveRecord and an appropriate database adapter are required."
|
32
32
|
gem.required_ruby_version = '>= 1.9.3'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require 'spec_helper'
|
2
3
|
|
3
4
|
describe RequestLogAnalyzer::FileFormat::Rails3 do
|
@@ -61,6 +62,11 @@ describe RequestLogAnalyzer::FileFormat::Rails3 do
|
|
61
62
|
subject.should parse_line(line).as(:parameters).and_capture(params: { action: 'cached', controller: 'cached' })
|
62
63
|
end
|
63
64
|
|
65
|
+
it 'parses a :parameters line with file upload correctly' do
|
66
|
+
line = 'Parameters: {"utf8"=>"✓", "authenticity_token"=>"eqHyMOSSzw35utH4nN+l28mRMdsHUbRxqh+hSMjag0w=", "user"=>{"photo"=>#<ActionDispatch::Http::UploadedFile:0x000000068fb190 @original_filename="IMG_2228.JPG", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[photo]\"; filename=\"IMG_2228.JPG\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/tmp/RackMultipart20141010-19270-zah6b7>>}, "commit"=>"speichern"}'
|
67
|
+
subject.should parse_line(line).as(:parameters).and_capture(:params => {:utf8 => "\u2713", :authenticity_token => "eqHyMOSSzw35utH4nN+l28mRMdsHUbRxqh+hSMjag0w=", :user => {"photo"=>"ActionDispatch::Http::UploadedFile:0x000000068fb190 @original_filename=\"IMG_2228.JPG\", @content_type=\"image/jpeg\", @headers=\"Content-Disposition: form-data; name=\"user[photo]\"; filename=\"IMG_2228.JPG\"\r\nContent-Type: image/jpeg\r\n\", @tempfile=\"File:/tmp/RackMultipart20141010-19270-zah6b7\""}, :commit => "speichern"})
|
68
|
+
end
|
69
|
+
|
64
70
|
it 'should parse :completed lines correctly' do
|
65
71
|
line = 'Completed 200 OK in 170ms (Views: 78.0ms | ActiveRecord: 48.2ms)'
|
66
72
|
subject.should parse_line(line).as(:completed).and_capture(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request-log-analyzer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.13.
|
4
|
+
version: 1.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
@@ -9,90 +9,90 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rspec
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '3'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: activerecord
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - '>='
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: sqlite3
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: mysql2
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: pg
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - '>='
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - '>='
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
description: |2
|
@@ -112,9 +112,15 @@ executables:
|
|
112
112
|
extensions: []
|
113
113
|
extra_rdoc_files:
|
114
114
|
- README.rdoc
|
115
|
+
- DESIGN.rdoc
|
116
|
+
- CONTRIBUTING.rdoc
|
117
|
+
- CHANGELOG.rdoc
|
118
|
+
- LICENSE
|
115
119
|
files:
|
116
|
-
-
|
117
|
-
-
|
120
|
+
- .gitignore
|
121
|
+
- .travis.yml
|
122
|
+
- CHANGELOG.rdoc
|
123
|
+
- CONTRIBUTING.rdoc
|
118
124
|
- DESIGN.rdoc
|
119
125
|
- Gemfile
|
120
126
|
- Gemfile.activerecord3
|
@@ -273,29 +279,29 @@ licenses:
|
|
273
279
|
metadata: {}
|
274
280
|
post_install_message:
|
275
281
|
rdoc_options:
|
276
|
-
-
|
282
|
+
- --title
|
277
283
|
- request-log-analyzer
|
278
|
-
-
|
284
|
+
- --main
|
279
285
|
- README.rdoc
|
280
|
-
-
|
281
|
-
-
|
286
|
+
- --line-numbers
|
287
|
+
- --inline-source
|
282
288
|
require_paths:
|
283
289
|
- lib
|
284
290
|
required_ruby_version: !ruby/object:Gem::Requirement
|
285
291
|
requirements:
|
286
|
-
- -
|
292
|
+
- - '>='
|
287
293
|
- !ruby/object:Gem::Version
|
288
294
|
version: 1.9.3
|
289
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
296
|
requirements:
|
291
|
-
- -
|
297
|
+
- - '>='
|
292
298
|
- !ruby/object:Gem::Version
|
293
299
|
version: '0'
|
294
300
|
requirements:
|
295
301
|
- To use the database inserter, ActiveRecord and an appropriate database adapter are
|
296
302
|
required.
|
297
303
|
rubyforge_project: r-l-a
|
298
|
-
rubygems_version: 2.
|
304
|
+
rubygems_version: 2.0.14
|
299
305
|
signing_key:
|
300
306
|
specification_version: 4
|
301
307
|
summary: A command line tool to analyze request logs for Apache, Rails, Merb, MySQL
|