Dashboard > WIP > Home > GreenPepper performance profiling
  WIP Log In View a printable version of the current page.  
  GreenPepper performance profiling
Added by Laurent Cobos, last edited by Laurent Cobos on Mar 24, 2009  (view change)
Labels: 
(None)

Known issues related to performance

Java

  • HtmlDocumentBuilder : concatenation of strings instead of using String.format seems to improve time it takes to parse the document
  • XmlRpcClient : use the XmlRpcClientLite if possible
  • XmlRpcClient : create one instance (lazy init) (GreenPepperRepository, AtlassianRepository)
  • DocumentBuilder : add a new method accepting the String html content (AtlassianRepository is creating a StringReader(content))

.Net

As seen in following screenshots, the execution time seems divided in two parts :

  1. Parsing the Html document
  2. Executing the specification

Then some issues where detected :

  • HtmlDocumentBuilder : regex are re-compiled each time needed (see method Compile(string pattern))
    One test maid, was to "cache" the differents Regex object used in document to prevent multiple re-instanciation of same Regex.
    The test has improved performance of ~15-20% here is the code that was used in test :
     private Regex Compile(string pattern)
            {
                Regex regex;
                if (knownRegexPattern.ContainsKey(pattern))
                {
                    regex = (Regex) knownRegexPattern[pattern];
                }else
                {
                    regex = new Regex(pattern);
                    knownRegexPattern.Add(pattern, regex);
                }
                return regex;
            }
    

    This code has not been commited.

  • GreenPepperRepository : IXmlRpcGreenPepperRepository GetProxy(string methodName) seems to take lot of cpu time first time it used.

Related to Jira task GP-737

Benchmark result on GreenPepper Core .NET :

For FileRepository and specification http://wiki.octopusnetwork.org/display/OPUS/Declining+rate+loans+with+exotic+instalments

Here is the command line :

GreenPepper.exe  -a "C:\dev\octo-fev-09\octopus\Src\Octopus.Fixture\bin\Debug\Octopus.Fixture.dll"  -l fr-FR -f Octopus.Fixture.CoreDomain.OGreenPepper.OctopusSUD "C:\Users\lcobos\AppData\Local\Temp\Confluence_OPUS_Declining rate loans with exotic instalments_specification.html" "C:\Users\lcobos\AppData\Local\Temp\Confluence_OPUS_Declining rate loans with exotic instalments_report.xml" --xml

Result : (dotnet profiler result source are here)

For GreenPepperRepository and specification http://wiki.octopusnetwork.org/display/OPUS/Charge+interest+during+gracePeriod

Here is the command line :

GreenPepper.exe "Confluence-OPUS/Charge interest during gracePeriod" -o GreenPepperReports -f "Octopus.Fixture.CoreDomain.OGreenPepper.OctopusSUD" -r "Greenpepper.Repositories.GreenPepperRepository;http://wiki.octopusnetwork.org/rpc/xmlrpc?handler=greenpepper1&sut=Octopus&includeStyle=false&implemented=true#OCTOPUS" -a "C:\dev\octo-fev-09\octopus\Src\Octopus.Fixture\bin\Debug\Octopus.Fixture.dll;GreenPepper.Core.dll;GreenPepper.Extensions.dll"


Result : (dotnet profiler result source are here)

For GreenPepperRepository and suite of specifications http://wiki.octopusnetwork.org/display/OPUS/

Here is the command line :
(profiling has been stopped after three specifications executions)

GreenPepper.exe "Confluence-OPUS" -o GreenPepperReports -f "Octopus.Fixture.CoreDomain.OGreenPepper.OctopusSUD" -r "Greenpepper.Repositories.GreenPepperRepository;http://wiki.octopusnetwork.org/rpc/xmlrpc?handler=greenpepper1&sut=Octopus&includeStyle=false&implemented=true#OCTOPUS" -a "C:\dev\octo-fev-09\octopus\Src\Octopus.Fixture\bin\Debug\Octopus.Fixture.dll;GreenPepper.Core.dll;GreenPepper.Extensions.dll" -s


Result : (dotnet profiler result source are here)

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators