openlsd.common.test
Class TestJavaCFunction

java.lang.Object
  extended by openlsd.common.test.TestJavaCFunction

public class TestJavaCFunction
extends java.lang.Object

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

Constructor Summary
TestJavaCFunction()
           
 
Method Summary
static void main(java.lang.String[] args)
          Takes only a path as argument
static void runC(java.io.File dirsource, java.lang.String outpath)
          run getLSDFiles in subdirectories in C
static void runJava(java.io.File dirsource, java.lang.String outpath)
          run getLSDFiles in subdirectories in Java
static void runJava2(java.io.File dirsource, java.lang.String outpath)
          run getLSDFiles in subdirectories in Java
static long runJavaRecur(java.io.File dirsource, java.lang.String outpath, java.nio.ByteBuffer niobb, long nbfile, byte[] blid, java.nio.channels.FileChannel filechannelout, int newlimit0)
          run getLSDFiles in subdirectories in Java
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestJavaCFunction

public TestJavaCFunction()
Method Detail

main

public static void main(java.lang.String[] args)
Takes only a path as argument

Parameters:
args -

runC

public static void runC(java.io.File dirsource,
                        java.lang.String outpath)
run getLSDFiles in subdirectories in C

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

runJava

public static void runJava(java.io.File dirsource,
                           java.lang.String outpath)
run getLSDFiles in subdirectories in Java

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

runJava2

public static void runJava2(java.io.File dirsource,
                            java.lang.String outpath)
run getLSDFiles in subdirectories in Java

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

runJavaRecur

public static long runJavaRecur(java.io.File dirsource,
                                java.lang.String outpath,
                                java.nio.ByteBuffer niobb,
                                long nbfile,
                                byte[] blid,
                                java.nio.channels.FileChannel filechannelout,
                                int newlimit0)
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