FileDocCategorySizeDatePackage
Throughput.javaAPI DocAndroid 5.1 API1659Thu Mar 12 22:22:30 GMT 2015android.filterpacks.performance

Throughput

public class Throughput extends Object
hide

Fields Summary
private final int
mTotalFrames
private final int
mPeriodFrames
private final int
mPeriodTime
private final int
mPixels
Constructors Summary
public Throughput(int totalFrames, int periodFrames, int periodTime, int pixels)

        mTotalFrames = totalFrames;
        mPeriodFrames = periodFrames;
        mPeriodTime = periodTime;
        mPixels = pixels;
    
Methods Summary
public floatgetFramesPerSecond()

        return mPeriodFrames / (float)mPeriodTime;
    
public floatgetNanosPerPixel()

        double frameTimeInNanos = (mPeriodTime / (double)mPeriodFrames) * 1000000.0;
        return (float)(frameTimeInNanos / mPixels);
    
public intgetPeriodFrameCount()

        return mPeriodFrames;
    
public intgetPeriodTime()

        return mPeriodTime;
    
public intgetTotalFrameCount()

        return mTotalFrames;
    
public java.lang.StringtoString()

        return getFramesPerSecond() + " FPS";