18.04.2013 Views

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

Dissertaç ˜ao de Mestrado Mestrado em Engenharia Informática Jo ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. FRAMEWORK EVALUATION 5.2. Operational Validation<br />

1 [mysqldump]<br />

2 quick<br />

3 quote-names<br />

4 max_allowed_packet = 16M<br />

5<br />

Listing 5.1: MySQL configuration file snippet<br />

6 # The MySQL database server configuration file.<br />

7<br />

8 !inclu<strong>de</strong>dir /etc/mysql/conf.d/<br />

• Files composed of blocks <strong>de</strong>limited by dynamic hea<strong>de</strong>rs and footers, and comments (i.e.,<br />

XML-like).<br />

Three tests were conducted, one with a file of each category. All the tests were ran on a<br />

syst<strong>em</strong> with the Intel Pentium Dual T3200 processor, 2 GB DDR2 main m<strong>em</strong>ory and Ubuntu<br />

Linux 9.04 operating syst<strong>em</strong>.<br />

Each test consisted on configuring an application by invoking SmART with the application<br />

configuration file. The configuration files were converted in XML and then converted back to<br />

their original format. Between the tests, the file was not modified, since Section 3.2 showed<br />

that file modification is not part of this dissertation scope.<br />

Due to the consi<strong>de</strong>rable length of each file, the tested configuration files are not integrally<br />

displayed in this section. Instead, they can be found in the appendix section of this dissertation<br />

(Chapter B). The examples refer to parts of the configuration file which were handpicked to<br />

display the tool behaviour in the presence of each pattern impl<strong>em</strong>ented by the file.<br />

To check the differences between the original and final file, the diff 1 UNIX utility was used.<br />

diff is a file comparison utility that shows the differences between two text files, in terms of<br />

different lines. Whenever lines from both files differ, the result shows the divergent lines of the<br />

original configuration file, and then those from the generated configuration file.<br />

5.2.1 INI-like Configuration Files<br />

This test consisted on configuring the MySQL database manag<strong>em</strong>ent syst<strong>em</strong>. The MySQL con-<br />

figuration file format is a slightly altered version of the INI format, but is still recognized<br />

by the tool. The configuration file (Listing 5.1) impl<strong>em</strong>ents parameters with zero or one as-<br />

signed values, contained in blocks <strong>de</strong>limited by a static hea<strong>de</strong>r (lines 1-4), comments (line<br />

6) and special instructions (line 8). The complete configuration file is in Annex B.1. The<br />

file containing the co<strong>de</strong> generated by the tool for this configuration file is found at http:<br />

//www-asc.di.fct.unl.pt/˜jml/SmART/ini.xml.<br />

The tool produced the following XML for the block (Listing 5.2), comment (Listing 5.3) and<br />

special instruction (Listing 5.4):<br />

The Metadata generated by the tool is represented on Figure 5.5.<br />

1 http://www.gnu.org/software/diffutils/diffutils.html<br />

54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!