openlsd.common.test.TestJavaCFunction Class Reference

Collaboration diagram for openlsd.common.test.TestJavaCFunction:

Collaboration graph
[legend]

List of all members.


Detailed Description

This class is only intend to test the performance of C and relative Java functions to determine on each system which one are better.
Author:
Frederic BREGIER LGPL 2007

Static Public Member Functions

static void main (String[] args)
static void runC (File dirsource, String outpath)
static void runJava (File dirsource, String outpath)
static void runJava2 (File dirsource, String outpath)
static long runJavaRecur (File dirsource, String outpath, ByteBuffer niobb, long nbfile, byte[]blid, FileChannel filechannelout, int newlimit0)

Static Private Member Functions

static void testgetFileFromPath (File storage)
static File createtempFile (File dir)
static FileChannel createFileChannel (File file)
static boolean addFileToByteBuffer (File file, byte[]blid, ByteBuffer niobb)
static void writeTempFile (ByteBuffer niobb, FileChannel filechannelout)

Static Private Attributes

static int newlimit0 = 85

Member Function Documentation

static void openlsd.common.test.TestJavaCFunction.main ( String[]  args  )  [static]

Takes only a path as argument

Parameters:
args 

static void openlsd.common.test.TestJavaCFunction.testgetFileFromPath ( File  storage  )  [static, private]

Test getFileFromPath close to the one in LSDCheckCommon

Parameters:
storage 

static File openlsd.common.test.TestJavaCFunction.createtempFile ( File  dir  )  [static, private]

Create a temp file in dir

Parameters:
dir 
Returns:
the temp File created or Null if in error

static FileChannel openlsd.common.test.TestJavaCFunction.createFileChannel ( File  file  )  [static, private]

Create a filechannel out from file

Parameters:
file 
Returns:
the filechannel out from file or Null if in error

static void openlsd.common.test.TestJavaCFunction.runC ( File  dirsource,
String  outpath 
) [static]

run getLSDFiles in subdirectories in C

Parameters:
dirsource The Path to check
outpath the path where to create temp file

static void openlsd.common.test.TestJavaCFunction.runJava ( File  dirsource,
String  outpath 
) [static]

run getLSDFiles in subdirectories in Java

Parameters:
dirsource The Path to check
outpath the path where to create temp file

static void openlsd.common.test.TestJavaCFunction.runJava2 ( File  dirsource,
String  outpath 
) [static]

run getLSDFiles in subdirectories in Java

Parameters:
dirsource The Path to check
outpath the path where to create temp file

static long openlsd.common.test.TestJavaCFunction.runJavaRecur ( File  dirsource,
String  outpath,
ByteBuffer  niobb,
long  nbfile,
byte[]  blid,
FileChannel  filechannelout,
int  newlimit0 
) [static]

run getLSDFiles in subdirectories in Java

Parameters:
dirsource The Path to check
outpath the path where to create temp file
niobb 
nbfile 
blid 
filechannelout 
newlimit0 
Returns:
number of current reference into ByteBuffer

static boolean openlsd.common.test.TestJavaCFunction.addFileToByteBuffer ( File  file,
byte[]  blid,
ByteBuffer  niobb 
) [static, private]

Add one file into the ByteBuffer

Parameters:
file 
blid 
niobb 
Returns:
True if inserted, else False

static void openlsd.common.test.TestJavaCFunction.writeTempFile ( ByteBuffer  niobb,
FileChannel  filechannelout 
) [static, private]

Write the temp file

Parameters:
niobb 
filechannelout 


Member Data Documentation

Number of reference to put in ByteBuffer. Each reference is about 97 bytes (round to 100) and this number should be close to a multiple of 4K (here 8K => 85) like newlimit0*96 = x*4K GETFILEFROMPATH(JavaRecurNIO):31582


The documentation for this class was generated from the following file: