util
Class Profiler

java.lang.Object
  extended by util.Profiler

public class Profiler
extends Object

A small class with static methods that allow the bench-marking of different floating point operations. It returns the estimated time for a thousand of floating point operations.


Field Summary
static int LOOP1E3
          Default number of 1 thousand loops.
static int LOOP1E6
          Default number of 1 million loops.
 
Constructor Summary
Profiler()
           
 
Method Summary
static long atangensProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long atangensProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long atrigonometricProfile()
          Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.
static long atrigonometricProfile(int loop)
          Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.
static long divProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long divProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long expProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long expProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long logProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long logProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static void main(String[] arg)
          Test all profiles on the current machine.
static long powerProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long powerProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long randomProfile()
          Does a certain number of calls to the random number generator and returns the milliseconds of execution time.
static long randomProfile(int loop)
          Does a certain number of calls to the random number generator and returns the milliseconds of execution time.
static long rootProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long rootProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long sumProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long sumProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long tangensProfile()
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long tangensProfile(int loop)
          Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.
static long trigonometricProfile()
          Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.
static long trigonometricProfile(int l)
          Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOOP1E6

public static final int LOOP1E6
Default number of 1 million loops.

See Also:
Constant Field Values

LOOP1E3

public static final int LOOP1E3
Default number of 1 thousand loops.

See Also:
Constant Field Values
Constructor Detail

Profiler

public Profiler()
Method Detail

randomProfile

public static final long randomProfile()
Does a certain number of calls to the random number generator and returns the milliseconds of execution time.


randomProfile

public static final long randomProfile(int loop)
Does a certain number of calls to the random number generator and returns the milliseconds of execution time.


trigonometricProfile

public static final long trigonometricProfile()
Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.


trigonometricProfile

public static final long trigonometricProfile(int l)
Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.


atrigonometricProfile

public static final long atrigonometricProfile()
Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.


atrigonometricProfile

public static final long atrigonometricProfile(int loop)
Does a certain number of calls to the trigonometric sin/cos function and returns the milliseconds of execution time.


sumProfile

public static final long sumProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


sumProfile

public static final long sumProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


divProfile

public static final long divProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


divProfile

public static final long divProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


tangensProfile

public static final long tangensProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


tangensProfile

public static final long tangensProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


atangensProfile

public static final long atangensProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


atangensProfile

public static final long atangensProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


rootProfile

public static final long rootProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


rootProfile

public static final long rootProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


logProfile

public static final long logProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


logProfile

public static final long logProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


expProfile

public static final long expProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


expProfile

public static final long expProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


powerProfile

public static final long powerProfile()
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


powerProfile

public static final long powerProfile(int loop)
Does a certain number of calls to the trigonometric tan function and returns the milliseconds of execution time.


main

public static void main(String[] arg)
Test all profiles on the current machine.