Every repository with this icon (
Every repository with this icon (
| Description: | A command line tool that analyzes request logfiles (e.g. Rails, Merb, Apache) to produce a performance report. edit |
-
0 comments Created 8 months ago by wvanbergenUse a request database as a source in the request pipelinefeature requestxComments
-
4 comments Created 8 months ago by wvanbergenAPIxAdd specs for FileFormat subclassingspecsxComments
barttenbrinke
Thu Oct 08 14:13:06 -0700 2009
| link
What do you want to have speced? That they actually parse these filetypes?
wvanbergen
Fri Oct 09 02:21:23 -0700 2009
| link
For example, you can do this:
class MyFileFormat < RequestLogAnalyzer::FileFormat::Rails # Add some additional lines here besides the standard Rails lines # Also, add some trackers to the report. # Hack the request class class Request < RequestLogAnalyzer::FileFormat::Rails::Request # hack the request class here end endSee http://wiki.github.com/wvanbergen/request-log-analyzer/creating-your-own-file-format-definition for more information. This should behave as expected and currently is completely unspeced. We use this at Floorplanner to parse some of the custom lines we add to our log, like the current user and his account type.
barttenbrinke
Mon Dec 14 07:22:48 -0800 2009
| link
So what do you want to spec? The hacks?
wvanbergen
Mon Dec 14 10:19:48 -0800 2009
| link
- When subclassing a file format, all line types of the parent file format should be parsed, and the newly added line types should be parsed as well.
- The parent file format should be left unchanged (so it should not parse any of the added line types).
The last bullet seems very logical/simple, but I really struggled to get this working correctly when I was implementing fileformat subclassing.
The same points can be made for the report trackers.
-
0 comments Created 8 months ago by wvanbergenAPIxAdd specs for request summary report definitionspecsxComments
-
2 comments Created 6 months ago by wvanbergenRails project integration brainstormfeature requestxWe could improve integration with a Rails project. This tickets contains some ideas to accomplish this:
Settings
- Request database connection in config/database.yml (see also #10). This way, it could even be accessed from the rails application itself :-)
- Store settings in config/rla.yml
- Store log filename pattern per environment in settings file (e.g. production.*.log.gz)
Rake tasks
rla:reportRun rla on and return ASCII report in terminalrla:report:htmlRun rla and create a HTML reportrla:report:yamlRun rla and create raw YAML report (se #13)rla:databaseParse request log and store requests in databaserla:database:resetClear the request database
Other ideas
- Archive reports (with date in filename) on a default location so comparisons are possible (e.g. /doc/performance)
- Run r-l-a as cronjob?
Comments
barttenbrinke
Sun Jun 21 13:32:17 -0700 2009
| link
rla:report and rla:report:html are allready there.
wvanbergen
Tue Aug 18 11:17:18 -0700 2009
| link
Separated out config file to separate issue (see #16)
-
0 comments Created 4 months ago by wvanbergenSupply settings file using --config optionfeature requestxAllow every command line option to be set using a configuration file. This file should probably be in YAML format and should be provided with the
--configoption.Comments
-
2 comments Created 3 months ago by wvanbergenfeature requestxAllow skipping first n bytes of fileparserxAdd --skip-bytes option to skip the first n bytes of a file. This makes it easier to not parse duplicate data.
Comments
barttenbrinke
Fri Sep 11 12:28:13 -0700 2009
| link
Wouldn't a skip-lines option be more logical?
wvanbergen
Sat Sep 12 06:22:10 -0700 2009
| link
Maybe that would be a nice feature as well, but bytes is useful to implement resuming, as you can simply store the filename, mtime and filesize of every logfile (which is what the database inserter already does). By skipping these bytes if the file has become bigger since the last parse, you can resume parsing a log that has new information in it.
-
3 comments Created 3 months ago by barttenbrinkeHave --after use more intelligence than it does nowfeature requestxLike parsing from back to front to determine starting position if after was given and file bigger than x bytes.
Comments
barttenbrinke
Sun Sep 13 03:40:11 -0700 2009
| link
def read_backwards_to_timestamp(path, timestamp) start = nil Elif.open(path) do |elif| elif.each do |line| if line =~ /\AProcessing .+ at (\d+-\d+-\d+ \d+:\d+:\d+)\)/ time_of_request = Time.parse($1) if time_of_request < timestamp break else start = elif.pos end end end end file = open(path) file.seek(start) if start file end
wvanbergen
Sun Sep 13 05:13:33 -0700 2009
| link
Maybe a binary search through the file is even faster :-)
However, the above implementation is very Rails specific. I don't know if this can be implemented in a file formated agnostic way.
barttenbrinke
Thu Oct 01 11:34:45 -0700 2009
| link
We could try to parse every line into a date :) Or have each file definition define a date_finder teaser regexp?
-
0 comments Created 3 months ago by wvanbergenfeature requestxAdd a --no-report optionreportingxTo speeds up parsing when you're not interested in the report, but only want a request database. This can boost performance and requires significantly less memory when there are a lot of request categories.
Comments
-
0 comments Created 3 months ago by wvanbergenfeature requestxlanguage formatsxAdd line_prefix option to FileFormatsparserxAllow specifying the line prefix for the file format. This may speed up parsing the file because the parser only has to check the beginning of the line for a match.
file_format.line_prefix = :any: allow any prefix (current behavior)file_format.line_prefix = 123: Every line has a prefix of 123 charactersfile_format.line_prefix = /line prefix regexp/: Every line starts with the given regexp.
The file_format's regular expressions will be adjusted accordingly. This option may be supplied to r-l-a using a command line switch like
--line-prefixComments
-
0 comments Created 3 months ago by wvanbergendatabase inserterxAdd specs to test the database consolespecsxAdd tests to ensure the database console is working as expected.
Comments
-
0 comments Created 2 months ago by wvanbergenfeature requestxAdd an index checking tracker for optimizing SQL queriesparserxAdd a SQL index checker to see whether indexes are set for the most popular queries, if the log file contains SQL queries.
For inspiration, see: http://github.com/samdanavia/ambitious_query_indexer
Comments
-
5 comments Created 2 months ago by wvanbergenbugxCheck database schema compatibilitydatabase inserterxBefore parsing requests into an existing database, check if the database schema is compatible with the file format. Currently, it will not insert all information or crash if the database schema is different from the file format.
Comments
barttenbrinke
Fri Nov 06 12:58:30 -0800 2009
| link
We should switch to mongodb. High performance Schema-less Database.
wvanbergen
Sat Nov 07 00:27:02 -0800 2009
| link
I don't think we should switch to MongoDB because it is a rather non-standard piece of technology, but offering it as an alternative is a good idea. Isn't there a MongoDB ActiveRecord mapper we can use?
barttenbrinke
Sat Nov 07 04:11:18 -0800 2009
| link
I think you should read up on Schemaless Databases. They are fundamentally different from relational databases, therefore a MongoDB ActiveRecord adapter whould be pretty useless. Especially if you are exploiting the specific benefits of a schemaless database. Datamapper is trying to build something that can do both, but a swap in is impossible.
wvanbergen
Sat Nov 07 23:17:24 -0800 2009
| link
My problem is that something like MongoDB is not that well known with most developers. Moreover, why should we choose MongoDB over CouchDB? Therefore, I don't think we should ditch the current RDBMS implementation.
Offering MongoDB as an alternative besides the current DBMSs is a better option IMHO. This is most easily possible if there is an AR adapter for MongoDB.
barttenbrinke
Mon Nov 09 12:28:26 -0800 2009
| link
Couch is for scaling, Mongo is for performance. The reason I think we should switch is that by using a schemaless DB, all our DB problems will go away. Things like indexes and dynamic columns will work out of the box.
Both should work through the datamapper adapter, but mongomapper is more stable.
-
0 comments Created 2 months ago by wvanbergendatabase inserterxResume parsing according to sources table in databasefeature requestxUse the records in the sources table in the database to skip the first part of a file if that was already parsed before.
Comments
-
0 comments Created 2 months ago by wvanbergenAPIxRewrite command line options using optparsedocumentationxDitch our current custom command line options parser for a standard parser using the optparse library. After this is finished, create a wiki page with all command line options.
Comments
-
0 comments Created 2 months ago by wvanbergenbugxFill source_id in warnings tabledatabase inserterxCurrently, the
source_idfield in the warnings table will always be filled withNULL.Comments
-
0 comments Created 2 months ago by wvanbergendatabase inserterxCreate indices after parsing hash finishedfeature requestxThis way, the DBMS does not have to update every index over and over when inserting new records
Comments
-
Make a screencast to demonstrate the tool.
Comments
barttenbrinke
Tue Nov 03 08:59:46 -0800 2009
| link
I could ask Geoffrey from peepcode. He still ows me one for lending my vga adapter at RailsConf Berlin :)
-
Is it a good idea to start a mailing list so people can get help using r-l-a?
Comments
-
0 comments Created 13 days ago by wvanbergenfeature requestxAdd PDF output possibilityreportingxAdd a new output class that creates a PDF report.
Comments
-
0 comments Created 13 days ago by wvanbergenfeature requestxAllow more customization of outputreportingxAllow output classes to override the output of a tracker to allow for more beautiful reports.
Comments
- API▾
- bug▾
- database inserter▾
- documentation▾
- feature request▾
- in progress▾
- language formats▾
- parked▾
- parser▾
- patch▾
- reporting▾
- specs▾
- Apply to Selection
-
Change Color…
Preview:preview
- Rename…
- Delete











