org.alfresco.repo.model.filefolder
Class FileFolderPerformanceTester

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.model.filefolder.FileFolderPerformanceTester
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AVMFileFolderPerformanceTester

public class FileFolderPerformanceTester
extends junit.framework.TestCase

Tests around some of the data structures that lead to performance degradation. We use the FileFolderService as it provides the most convenient and most common test scenarios.

Note that this test is not designed to validate performance figures, but is rather a handy tool for doing benchmarking. It is therefore not named *Test as is the pattern for getting tests run by the continuous build.


Field Summary
protected static org.springframework.context.ApplicationContext ctx
           
protected  org.alfresco.service.cmr.repository.NodeService nodeService
           
protected  RetryingTransactionHelper retryingTransactionHelper
           
 
Constructor Summary
FileFolderPerformanceTester()
           
 
Method Summary
protected  org.alfresco.service.cmr.repository.NodeService getNodeService()
           
protected  org.alfresco.service.cmr.repository.NodeRef getOrCreateRootFolder()
           
static void main(java.lang.String[] args)
          Create a bunch of files and folders in a folder and then run multi-threaded directory listings against it.
 void setUp()
           
 void test_4_ordered_3_2_100()
           
 void test_4_shuffled_3_2_100()
           
 void testSetUp()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ctx

protected static org.springframework.context.ApplicationContext ctx

retryingTransactionHelper

protected RetryingTransactionHelper retryingTransactionHelper

nodeService

protected org.alfresco.service.cmr.repository.NodeService nodeService
Constructor Detail

FileFolderPerformanceTester

public FileFolderPerformanceTester()
Method Detail

getNodeService

protected org.alfresco.service.cmr.repository.NodeService getNodeService()

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testSetUp

public void testSetUp()
               throws java.lang.Exception
Throws:
java.lang.Exception

getOrCreateRootFolder

protected org.alfresco.service.cmr.repository.NodeRef getOrCreateRootFolder()

test_4_ordered_3_2_100

public void test_4_ordered_3_2_100()
                            throws java.lang.Exception
Throws:
java.lang.Exception

test_4_shuffled_3_2_100

public void test_4_shuffled_3_2_100()
                             throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
Create a bunch of files and folders in a folder and then run multi-threaded directory listings against it.

Parameters:
args - where 'x' is the number of files in a folder and 'y' is the number of threads to list


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.