4. Semester rapport :
Produkt rapporten - Proces rapporten - Bilag - Term ordbog - Tidsplan


 

1 - Vores dokumentation

Dette afsnit indenholder vores dokumentation udfærdiget og designet til Pro-Filer.



     1  Vores dokumentation
             1.1  Xml
                     1.1.1  Profiler xml
                     1.1.2  Profiler dtd
                     1.1.3  Profiler xsl
                     1.1.4  Profiler css
                     1.1.5  Profiler Tag Lister
                     1.1.6  Profiler js
             1.2  Interesante klasser og metoder
     2  Ekstern dokumentation
             2.1  MySQL
             2.2  Web application benchmarks





 

1.1 - Xml


Xml har egenskaber der egner sig storartet til et projekt af denne art, da man kan bruge de mange muligheder, der er, til at standardisere en tekst efter en tildelt metode template(DTD). Vi har udviklet understående eksempel på en opbygnings struktur med alle tilknyttede typer dokumenter.
Dette i form af DTD, XSL, CSS og det egentlige XML dokument. Grundet ressourcemangel er dette ikke indkoorporeret i systemet med en Java-XML parser, men kunne i det fremtidige produkt være en metode til at håndtere dokumentstyringen.




 

1.1.1 - Profiler xml

<?xml version="1.0" standalone="yes"?>
<?xml:stylesheet href="04.0_profiler.css" type="text/css"?>
<!DOCTYPE profiler SYSTEM "02.0_profiler.dtd">

<profiler>
     <documentheader>
          <title>title element nested in documentheader</title>
          <subtitle>
           subtitle element nested in documentheader
          </subtitle>
          <subheader>subheader element nested in documentheader</subheader>
          <scope>
               <paragraph>
                    <line>line element double nested in documentheader_scope_paragraph</line>
               </paragraph>
          </scope>
          <paragraph>
               <line>line element nested in documentheader_paragraph</line>
          </paragraph>
     </documentheader>
     <documentbody>
          <title>title element nested in documentbody</title>
          <scope>
               <paragraph>
                    <line>line element double nested in documentbody_scope_paragraph</line>
               </paragraph>
          </scope>
          <subbody>subbody element nested in documentbody</subbody>
          <paragraph>
               <line>line element nested in documentbody_paragraph</line>
          </paragraph>
     </documentbody>
     <documentfooter>
          <title>title element nested in documentfooter</title>
          <scope>
               <paragraph>
                    <line>line element double nested in documentfooter_scope_paragraph</line>
               </paragraph>
          </scope>
          <paragraph>
               <line>line element nested in documentfooter_scope_paragraph</line>
          </paragraph>
     </documentfooter>
     <info>
          <development_manager>Profiler Netsolutions&copy;</development_manager>
          <development_team>Gruppe5</development_team>
          <position/>
     </info>
     <!-- the exact same thing as above -->
     <documentheader>
          <title>title element nested in documentheader</title>
          <subtitle>
           subtitle element nested in documentheader
          </subtitle>
          <subheader>subheader element nested in documentheader</subheader>
          <scope>
               <paragraph>
                    <line>line element double nested in documentheader_scope_paragraph</line>
               </paragraph>
          </scope>
          <paragraph>
               <line>line element nested in documentheader_paragraph</line>
          </paragraph>
     </documentheader>
     <documentbody>
          <title>title element nested in documentbody</title>
          <scope>
               <paragraph>
                    <line>line element double nested in documentbody_scope_paragraph</line>
               </paragraph>
          </scope>
          <subbody>subbody element nested in documentbody</subbody>
          <paragraph>
               <line>line element nested in documentbody_paragraph</line>
          </paragraph>
     </documentbody>
     <documentfooter>
          <title>title element nested in documentfooter</title>
          <scope>
               <paragraph>
                    <line>line element double nested in documentfooter_scope_paragraph</line>
               </paragraph>
          </scope>
          <paragraph>
               <line>line element nested in documentfooter_scope_paragraph</line>
          </paragraph>
     </documentfooter>
     <info>
          <development_manager>Profiler Netsolutions&copy;</development_manager>
          <development_team>Gruppe5</development_team>
          <position/>
     </info>
     
</profiler>




 

1.1.2 - Profiler dtd

<!--============= Profiler Text Markup =============================-->
<!--========== Profiler document standard ==========================-->

     <!ELEMENT profiler (documentheader, documentbody, documentfooter, info?)>

     <!ELEMENT documentheader (
          title+,
          subtitle?,
          line*,
          subheader*,
          scope+,
          paragraph+,
          source_file?
     )
          
     >
     
     <!ELEMENT documentbody (
          title+,
          subtitle?,
          line*,
          scope+,
          subbody*,
          paragraph+,
          source_file?
     )
          
     >

<!ELEMENT documentfooter (
          title+,
          subtitle?,
          line*,
          scope+,
          subfooter*,
          paragraph+,
          source_file?
     )
          
     >

<!ELEMENT info (
          development_manager,
          development_team,
          position
     )
          
     >
     
     <!ELEMENT title (#PCDATA)>
<!ELEMENT subtitle (#PCDATA)>
     <!ELEMENT subheader (#PCDATA)>
     <!ELEMENT subbody (#PCDATA)>
     <!ELEMENT subfooter (#PCDATA)>
     
     <!ELEMENT scope (paragraph+)>
     
     <!ELEMENT paragraph (line+, source_file?, index*)>
     <!ELEMENT line (#PCDATA)>
     <!ELEMENT source_file (#PCDATA)>     
     <!ELEMENT index (#PCDATA)>
     
     <!ELEMENT development_manager (#PCDATA)>
     <!ELEMENT development_team (#PCDATA)>
     <!ELEMENT position (#PCDATA)>               
     
     
<!--======== Profiler single command integrated entities ==========-->

     <!ENTITY amp "&#038;#038;" >
     <!ENTITY copy "&#169;" >
     <!ENTITY add "&#064;" >
     <!ENTITY tab "&#09;" >
     
     
<!--============= Profiler Tag Markup =============================-->

<!ELEMENT BR EMPTY > <!-- forced line break -->



 

1.1.3 - Profiler xsl

<?xml version='1.0' ?>

<!-- Here a namespace link should be typed, but since nobody has implementet a resonable documentation for
this type-code it is excluded until we can create one ourselfes -->

<xsl:stylesheet>
<xsl:template match="/">
<html>

<head>
<title>Profiler Netsolutions</title>
</head>

<body bgcolor='#F09990'> <!-- '#F0F0F0' -->

<xsl:for-each select="document">
<title style = "font-family: Tahoma, HandelGothic BT, Frugal Sans, Eurostile Extended; ;
                     background :#F0F0F0;
                      display: block;
                     font-weight: bold;
      font-size: 20pt;
                     color: 'Maroon';
padding-bottom:1px;
text-align:center">

<xsl:value-of select="document" />

</title>
</xsl:for-each>

<xsl:for-each select="header">
     <p style = "font-family:sans-serif;
padding-bottom:7px;
font-size:12px;
letter-spacing:5px;
text-align:center">

<xsl:value-of select="header" />

</p>
</xsl:for-each>

<xsl:for-each select="label">
     <p style = "font-family:sans-serif;
padding-top:7px;
font-size:13px">

<xsl:value-of/>
</p>

</xsl:for-each>

</body>
</html>

</xsl:template>

</xsl:stylesheet>





 

1.1.4 - Profiler css

profiler {
    font-family: Tahoma, HandelGothic BT, Frugal Sans, Eurostile Extended;
}

title {
    display: block;
    height: 10px;
    padding: 3px;
    background :#000000;
    color: "white";
    font-weight: bold;
    font-size: 14pt;
}

subtitle {
    display: block;
    font-size: 14pt;
}

documentheader {
    display: block;
    margin-left: 14;
    padding: 3px;
    font-size: 12pt;
    color: "maroon";
}

documentbody {
    display: block;
    padding: 3px;
    margin-left: 16;
    font-size: 12pt;
    color: "maroon";
}

subheader, subbody {
    background :#F0F0F0;
    font-size: 14pt;
    margin-left: 40;
}

documentfooter {
    background :#FFFFFF;
    display: block;
    padding: 3px;
    margin-left: 16;
    font-size: 8pt;
    color: "maroon";
}

subfooter {
    display: block;
    margin-left: 25;
    font-size: 10pt;
}

documentfooter title {
    background :#FFFFFF;
    display: block;
    padding: 3px;
    margin-left: 16;
    font-size: 8pt;
    color: "maroon";
}

documentfooter paragraph {
    background :#FFFFFF;
    display: block;
    margin-left: 25;
    font-size: 8pt;
    color: "maroon";
}

documentfooter scope paragraph {
    background :#FFFFFF;
    display: block;
    margin-left: 25;
    font-size: 8pt;
    color: "maroon";
}

scope {
    font-size: 12pt;
    color: "black";
}

paragraph {
    display: block;
    margin-left: 12;
    font-size: 12pt;
    color: "black";
}

line {
    font-size: 10pt;
    color: "black";
}

info {
    display: block;
    margin-left: 550pt;
    font-size: 8pt;
    color: "maroon";
}




 

1.1.5 - Profiler Tag Lister

XML Tag Lister

Profiler.xml benytter sig af følgende tags :

Dette er lavet med nedentstående JavaScript!!!


 

1.1.6 - Profiler js

function findTagsPresent()
{
    var arrayOfPieces = new Array()
    arrayOfPieces = gXMLString.split(" ")
    numberOfPieces = arrayOfPieces.length

    var tagsPresent = new Array()
    var tagsPresentCounter
    tagsPresentCounter = 0

    for (i=0; i<numberOfPieces; i++)
    {
        if ((arrayOfPieces[i].indexOf("<") == 0) && (arrayOfPieces[i].indexOf(">") == (arrayOfPieces[i].length-1)) && 
           (arrayOfPieces[i].indexOf("</") == -1))
        {
            // If that's the case, then we've found an opening tag.
            var arrayLength
            arrayLength = tagsPresent.length

            var foundIt
            foundIt = false

            for (j=0; j<arrayLength; j++)
            {
                if (tagsPresent[j] == arrayOfPieces[i])
                {
                    foundIt = true
                    break
                }
            }

            if (foundIt != true)
            {
                //And if that's the case, it's not already in tagsPresent
                tagsPresent[tagsPresentCounter] = arrayOfPieces[i]

                tagsPresentCounter++
            }
        }
    }
    return tagsPresent
}

function writeListOfTagsPresent()
{
     var listOfTags
     listOfTags = findTagsPresent()
     listLength = listOfTags.length

     document.write("<UL>")

     for (i=0; i<listLength; i++)
          {
          document.write("<LI>") 
          var tagStringLength
          tagStringLength = listOfTags[i].length

          var strippedTagString
          strippedTagString = listOfTags[i].substring(1, (tagStringLength-1))

          document.write(strippedTagString)
          }

     document.write("</UL>")
}



 

1.2 - Interesante klasser og metoder

Mostly removed in the online version.

dk.dkik.profiler.framework.kernel.PKernel
java.lang.Object
     dk.dkik.profiler.framework.kernel.PKern
          dk.dkik.profiler.framework.kernel.PKernel
The PKernel-class is the most importent class in the profiler-framework. Please se the manual for a complete description

 

2 - Ekstern dokumentation

Dette er dokumentation, som vi ikke selv har kreeret, men som er hentet fra eksterne sourcer.

 

2.1 - MySQL

From http://MySQL.org/doc.html



In the first round of testing I created two workloads, one heavy in transactions, and one heavy in the number of simultaneous clients (threads) that were accessing the database.
The results can be seen below in both graphical and tabular formats.
It is interesting to note that only one product (mm.mysql/mysql) completed the benchmark without failing any transactions. Both mysql drivers scaled better than the others during heavy loads, but mm scaled the best, providing anywhere from 6 to 12 times the transaction processing rate under heavy client load, and 2 to 4 times the transaction processing rate under heavy transaction load.
Graphical Depictions

 

Raw Data for Heavy Transaction Load

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 1 100 35.36 835808 0
twz/mysql 1 100 62.15 901120 0
jdbc-odbc:jet 1 100 13.73 884800 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 5 100 87.9 933816 0
twz/mysql 5 100 102.98 987952 14
jdbc-odbc:jet 5 100 7.54 968912 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 10 100 75.12 945464 0
twz/mysql 10 100 96.94 994240 73
jdbc-odbc:jet 10 100 10.69 894800 1000

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 50 100 79.4 925896 0
twz/mysql 50 100 52.3 985904 1901
jdbc-odbc:jet 50 100 DNF DNF 5000

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 100 100 79.53 949120 0
twz/mysql 100 100 30.19 1008672 1868
jdbc-odbc:jet 100 100     10000

Raw Data for Heavy Client Load

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 1 4 9.48 167192 0
twz/mysql 1 4 8.26 218608 0
jdbc-odbc:jet 1 4 4.66 192296 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 10 4 36.56 699792 0
twz/mysql 10 4 12.17 484624 9
jdbc-odbc:jet 10 4 12.92 461614 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 20 4 58.19 961912 0
twz/mysql 20 4 38.76 633304 40
jdbc-odbc:jet 20 4 12.22 753264 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 50 4 70.32 919856 0
twz/mysql 50 4 57.72 947000 16
jdbc-odbc:jet 50 4 10.22 847784 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 100 4 36.99 901816 0
twz/mysql 100 4 33.16 1005816 85
jdbc-odbc:jet 100 4 7.42 973768 0

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 200 4 58.45 932080 0
twz/mysql 200 4 14.02 1020168 180
jdbc-odbc:jet 200 4 3.74 1002280 391

Driver/DB Clients TPC Transactions/Sec Max Mem Failed Transactions
mm/mysql 300 4 63 932080 0
twz/mysql 300 4 10.12 1025028 261
jdbc-odbc:jet 300 4 2.55 986696 904





 

2.2 - Web application benchmarks

Web Application Benchmarks :: Hello World
  • Fastest Web Benchmarks by Hits/sec [for fun, do not take results seriously]
 
Explanation & Disclaimer
What follows are some benchmarks with various web application environments, testing the speed of a minimal Hello World program. Please feel free to contribute to these benchmarks by providing your relevant system information, and following a simple methodology. Please use code identical to what is provided below, or if in a new environment not already represented, please follow the spirit. You may post new results to the mod_perl mailing list at modperl@apache.org, cc'ing me at joshua@chamas.com.

Matt Sergeant started this to test the speed of web application environments. His thought was that a simple Hello World would test for the raw startup speed of those environments.

These benchmarks represent real world scenarios.

Fastest Benchmarks for Code Types by Hits/s
HITS/S
/MHZ
CODE TYPE WEB SERVER APPLICATION HITS/S OS CPU SESSION CLIENT FROM HTTP BY DATE MHZ
3.545 HTML iis 4.0 static_html 1886 WinNT 4.0 SP4 PII-266 x 2 no ab net 100M 1.0 ks 1999/07 532
1.042 ModPerl Handler apache 1.3.9 mod_perl 1042 Linux/RH 2.2.14 PIII-500 x 2 no ab net 100M 1.0 ct NEW 1000
2.563 C Apache Module apache 1.3.6 mod_hello 897 Linux 2.2.7 PII-350 no ab local 1.0 jb   350
1.565 PHP apache 1.3.7dv mod_php 4-alpha 626 Linux 2.2.10 PII-400 no ab net 10M 1.0 rl   400
1.015 ASP VBScript iis 4.0 asp/vbscript 540 WinNT 4.0 SP4 PII-266 x 2 no ab net 100M 1.0 ks 1999/07 532
0.597 Perl CGI apache 1.3.4 mod_perl/registry 537 Linux 2.2.10 PII-450 x 2 no ab net 100M 1.0 dm   900
0.816 Velocigen Perl apache 1.3.9 velocigen_perl 2.0 367 Linux/RH 6.0 PIII-450 no ab local 1.0 sa 1999/12 450
1.372 JSP Java apache 1.3.9 resin 1.1b3 365 Linux/RH 6.0 PII-266 no ab net 100M 1.0 sf 1999/12 266
1.331 Java Servlet apache 1.3.9 resin 1.1b3 354 Linux/RH 6.0 PII-266 no ab net 100M 1.0 sf 1999/12 266
1.158 JSP JavaScript apache 1.3.9 resin 1.1b3 308 Linux/RH 6.0 PII-266 no ab net 100M 1.0 sf 1999/12 266
0.861 Perl Raw CGI apache 1.3.9 mod_perl/registry 229 Linux/RH 6.0 PII-266 no ab net 100M 1.0 sf 1999/12 266
0.420 C CGI Executable apache 1.3.6 C/C++_cgi 210 Linux 2.2.10 PIII-500 no ab local 1.0 ct   500
0.617 Embperl apache 1.3.6 mod_perl/embperl 185 FreeBSD 2.2.7 PII-300 yes ab local 1.0 rr   300
0.530 SSI Include iis 4.0 ssi_inc 159 WinNT 4.0 SP6 PII-300 no scr local 1.0 jc   300
0.536 Jolt enhydra jolt 125 Linux 2.2.7 PII-233 no ab local 1.0 ks 1999/07 233
0.370 ASP PerlScript apache 1.3.4 mod_perl/asp .18 111 Solaris 2.6 PII-300 no ab net 10M 1.0 jc NEW 300
0.317 ePerl apache 1.3.4 mod_perl/eperl 2.2.13 95 Solaris 2.6 PII-300 no ab net 10M 1.0 jc NEW 300
0.310 Mason apache 1.3.4 mod_perl/mason 93 Solaris 2.6 PII-300 no ab net 10M 1.0 jc NEW 300
0.137 RXML roxen 1.3.2 roxen/challenger 41 WinNT 4.0 SP6 PII-300 no scr local 1.0 jc 1999/12 300


LEGEND

ct - Chip Turner
dm - Dirk Melchers
jb - Jeffrey Baker
jc - Joshua Chamas
js - John Smirl
ks - Kimbro Staken
rl - Rasmus Lerdorf
rr - Rudy Rucker
rt - Renzo Toma
sa - Shahin Askari
sf - Scott Ferguson
tm - Tom Mornini

ab - ApacheBench, part of Apache installation on UNIX
scr - Socrates, from www.morphtech.com which is no longer up, results with this client are invalid for IIS + ASP, as the test client will not utilize 100% CPU on testing client machine.

local - Web client and server running on same machine.
net - Web client runs over network on machine with less than 100% CPU utilization, with web server at 100% CPU utilization. This is the optimal form of testing, and shows the server running at max capacity.

 

METHODOLOGY

  • Web servers should be roughly in production mode, with everything enabled that would be normally, including logging.

  • More than one benchmark must be run on any system for it to show up under the GROUP BY OS/CPU listing. Just the same a web language must be run by more than one tester or system for it to show up under the GROUP BY Code Type listing. What the latter means is that for a benchmark for a new language to be taken seriously, more than one person needs to benchmark it. These limitations are here to help facilitate reasonable comparisons of web languages on various platforms.

  • runtime of the test should be near 30 seconds

  • 5-10 clients should be used concurrently, preferrably running on another machine. If other machine is used, make sure that it is running at 100% CPU, so that the client is not being maxed out. If you cannot max out the CPU try to remove the bottleneck, i.e. if over a slow network, run the test locally.

  • Session refers to an ASP style user session keyed by unique cookie and data stored on server.

  • The code and html used tries to bridge the gap between embedded html and scripted environments, with one script line and one static line for embeded, and two script lines plus appropriate HTTP headers for pure scripted environments. See below for sources.

  • HTTP 1.0 clients tests should be used, and will be the only ones used for the front page "Fastest Benchmarks".

 

BENCHMARK CODE

ASP PerlScript <%@LANGUAGE=PerlScript%> <%$Response-> Write("Hello "); %> World # Apache::ASP no sessions config: # PerlSetVar NoState 1 # PerlSetVar StatScripts 0 # # Apache::ASP sessions SDBM_File # PerlSetVar StateCache 1 # PerlSetVar StateDir /tmp/hello # PerlSetVar AllowApplicationState 0 # # Apache::ASP sessions DB_File # PerlSetVar StateCache 1 # PerlSetVar StateDir /tmp/hello # PerlSetVar AllowApplicationState 0 # PerlSetVar StateDB DB_File # # testing sessions with ab: because ab does not # parse cookies, set: # PerlSetVar SessionQuery 1 # and call the test script like # script.asp?session-id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa # so a new session won't be created each request. # This is more reflective of real world use where most # people use cookies, so the old session will be reused # after the first request. # ASP VBScript <%@LANGUAGE=VBScript%> <% Response.Write("Hello ") %>World C CGI Executable #include <stdio.h> void main( void ){ printf("Content-Type: text/html\n\n"); printf("Hello "); printf("World!"); } C Apache Module // alot more code to actually compile, // see modperl archives for code under subject // Re: mod_perl vs. C execution time. // From: Ask Bjoern Hansen module MODULE_VAR_EXPORT hello_module; static int hello_handler(request_rec *r) { r->content_type = "text/html"; ap_send_http_header(r); ap_rputs("Hello ",r); ap_rputs("World!",r); return OK; } Embperl [- print OUT "Hello "; -]World ## Optimized with: ## PerlSetEnv EMBPERL_OPTIONS 8083 ## PerlSetEnv EMBPERL_DEBUG 0 ## For user sessions on Win32, in %udat, config: ## PerlModule Apache::Session::Win32 ; ## PerlSetEnv EMBPERL_SESSION_CLASS Win32 ## ## Please note that print OUT is atypical use in Embperl, but is ## the mechanism similar to ASP's ->Write() that you can use ## from other modules, when decomping routines out of the main script. ePerl #!/usr/local/bin/perl <: print "Hello "; :>World HTML Hello World Jolt // enhydra compiles this into a servlet. <JOLT JAVADEF> void setJoltFields(JoltPage page) throws Exception { page.data.set("world", "World!"); } </JOLT> Hello <JOLT JAVACALL="setJoltFields"> </JOLT> (@world@) Java Servlet import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Hello extends HttpServlet { public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out; // set content type and other response header fields first response.setContentType("text/html"); // then write the data of the response out = response.getWriter(); out.println("Hello"); out.println("World"); out.close(); } } JSP Java <%@ page language='java' session='false' %><% out.print("Hello "); %>World JSP JavaScript <%@ page language='javascript' session='false' %><% out.write("Hello "); %>World Mason <%perl>print "Hello ";</%perl>World # Apache *.conf PerlRequire /tmp/mason_handler.pl AddType text/html .mas # mason_handler.pl package HTML::Mason; use HTML::Mason; my $parser = new HTML::Mason::Parser; my $interp = new HTML::Mason::Interp ( parser=>$parser, comp_root=>'/usr/local/proj/link/site/hello/', data_dir=>'/tmp' ); my = new HTML::Mason::ApacheHandler (interp=>$interp); sub handler { $ah->handle_request(shift); } 1; ModPerl Handler package Apache::bench; sub handler { my($r) = shift; $r->content_type('text/html'); $r->send_http_header(); $r->print('Hello '); $r->print('World'); 200; } 1; Perl CGI use CGI; my $cgi = CGI->new(); print $cgi->header(); print "Hello "; print "World"; Perl Raw CGI ## does not "use CGI" which can kill normal cgi apps that don't ## cache module loading the way mod_perl and perlex do. print "HTTP/1.1 200 OK\n"; print "Content-Type: text/html\n\n"; print "Hello "; print "World";
PHP
<?echo "Hello "?>
World

RXML
<pike>
    output("Hello ");
</pike>World

    SSI Include

    ## hello.static is the Hello World static html file

    <!--#include file="hello.static"-->


    Velocigen Perl
    <perl>
        print "Hello ";
    </perl>World


Oracle