User:Linda Pettigrew:Design Study2
Line 41: | Line 41: | ||
=== Description of Classes === | === Description of Classes === | ||
− | [[image:ljp51-EventLoader|frame|Figure 3. Detailed view of EventLoader]] | + | [[image:ljp51-EventLoader.pdf|frame|Figure 3. Detailed view of EventLoader]] |
=====Event Loader - Strategy Pattern===== | =====Event Loader - Strategy Pattern===== |
Revision as of 01:27, 1 October 2010
Navigation shortcuts: Wiki users:Linda Pettigrew
Contents |
An Analysis Tool for Log Files
This project looks at the design decisions made during the development of a tool to extract data from XML log files. While this project will be used to extract results for an honours project, the entire tool was developed during this course: there was no code or ideas for this code in existance before the commencement of COSC427.
Background
A tool has been developed to collect event-driven data from developers while they are using eclipse. The data collected contains details about the event which has occurred such as the number of charcters added during an edit, the time of the edit and the file the edit occurred on. An example of the data collected is shown in figure 1.
This project focusses on developing a tool to extract meaningful summary data from these logs.
Design Study
Requirements
The tool needs to generate a meaningful model of a user's session before analysing data collected from a user. Factors to consider:
- Initial trials of the collection tool are stored data in a database. There may be a need to analyse this data in the future.
- Xml logs of events are stored in zip files.
- Events will need to be loaded from xml files.
- A meaningful model will need to be constructed from the events. This model may change at a later date.
- The model may contain elements which are derived from more than one event for example a Launch will be composed with the information in a RunProject event and the subsequent Console output.
Information will then be gathered from the model of a user.
- Measurements may be time related such as number of events per 20 minute block or they may be simply counting events - different types of measurement need to be written to different files.
- More measurements will be made at a later date. It must be simple to add a new measurement.
- Measurements will need to be able to be written to both xml and csv files.
Application Design
UML Diagram - Complete
Description of Classes
Event Loader - Strategy Pattern
Data collected from eclipse has been logged in a number of different ways (xml log file and to a database in the releases to date). Since the method of logging the data affects how the events will be loaded the strategy design pattern has been used for construction of a list of events.
Strategy pattern components:
- Context =>
- Strategy => EventLoader
- AlgorithmInterface() => LoadEvents()
- ConcreteStrategies => DBEventLoader, XMLEventLoader, ZipFileEventLoader
FileEventLoader - Decorator Pattern
The collection tool currently uploads zipped xml files to a server. To analyse these zipped files they need to be unzipped. This behaviour would be necessary for the analysis of log file stored in other file formats too (for example tab delimited files) so the functionality for extraction is provided as a decorator.
Decorator pattern components:
- Component => FileEventLoader
- Operation() => LoadEvents()
- ConcreteDecorator => ZipFileEventLoader
- ConcreteComponent => XMLEventLoader
- AddedBehavior() => ExtractXMLFile()