Merged DEV/WCM-PERMISSIONS2 to HEAD

AVM folder diff (r9383-r9503)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9545 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-06-23 15:06:50 +00:00
parent 10240e71f4
commit e438c81d27
11 changed files with 1956 additions and 191 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -37,28 +37,39 @@ public class AVMScaleTestP extends AVMServiceTestBase
public void testScaling()
{
int n = 250; // The number of BulkLoads to do.
int futzCount = 10; // The number of post snapshot modifications to make after each load.
String load = "/Users/britt/hibernate-3.1"; // The tree of stuff to load.
BulkLoader loader = new BulkLoader();
loader.setAvmService(fService);
loader.setPropertyCount(50);
BulkReader reader = new BulkReader();
reader.setAvmService(fService);
long lastTime = System.currentTimeMillis();
for (int i = 0; i < n; i++)
try
{
System.out.println("Round " + (i + 1));
fService.createStore("store" + i);
loader.recursiveLoad(load, "store" + i + ":/");
fService.createSnapshot("store" + i, null, null);
long now = System.currentTimeMillis();
System.out.println("Load Time: " + (now - lastTime) + "ms");
lastTime = now;
reader.recursiveFutz("store" + i, "store" + i + ":/", futzCount);
now = System.currentTimeMillis();
System.out.println("Read Time: " + (now - lastTime) + "ms");
System.out.flush();
lastTime = now;
int futzCount = 10; // The number of post snapshot modifications to make after each load.
String load = "config/alfresco"; // The tree of stuff to load.
BulkLoader loader = new BulkLoader();
loader.setAvmService(fService);
loader.setPropertyCount(50);
BulkReader reader = new BulkReader();
reader.setAvmService(fService);
long lastTime = System.currentTimeMillis();
for (int i = 0; i < n; i++)
{
System.out.println("Round " + (i + 1));
fService.createStore("store" + i);
loader.recursiveLoad(load, "store" + i + ":/");
fService.createSnapshot("store" + i, null, null);
long now = System.currentTimeMillis();
System.out.println("Load Time: " + (now - lastTime) + "ms");
lastTime = now;
reader.recursiveFutz("store" + i, "store" + i + ":/", futzCount);
now = System.currentTimeMillis();
System.out.println("Read Time: " + (now - lastTime) + "ms");
System.out.flush();
lastTime = now;
}
}
finally
{
for (int i = 0; i < n; i++)
{
if (fService.getStore("store" + i) != null) { fService.purgeStore("store" + i); }
}
}
}
}