Android Open Source - AndroidMemoryLogger Memory Logger






From Project

Back to project page AndroidMemoryLogger.

License

The source code is released under:

MIT License

If you think the Android project AndroidMemoryLogger listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.otiasj.memoryLogger.loggers;
/*from   ww w.ja  v  a2s  .  co  m*/
import android.util.Log;

import com.otiasj.memoryLogger.utils.MemoryUtils;

public class MemoryLogger implements OnMemoryLog {

    @Override
    public void onLog(final String tag, final double allocated, final double heapSize, final double percent,
            final double nativeUsed, final double nativeHeapSize) {
        Log.v(tag,
                "" + MemoryUtils.decimalFormat.format(allocated) + "/" + MemoryUtils.decimalFormat.format(heapSize)
                        + " " + MemoryUtils.decimalPercentFormat.format(percent) + "%"
                        + MemoryUtils.decimalPercentFormat.format(nativeUsed) + "/"
                        + MemoryUtils.decimalPercentFormat.format(nativeHeapSize));
    }
}




Java Source Code List

com.otiasj.memoryLogger.Memory.java
com.otiasj.memoryLogger.loggers.FileLogger.java
com.otiasj.memoryLogger.loggers.MemoryLogger.java
com.otiasj.memoryLogger.loggers.OnMemoryLog.java
com.otiasj.memoryLogger.loggers.WidgetLogger.java
com.otiasj.memoryLogger.utils.MemoryUtils.java
com.otiasj.memoryLogger.view.MemoryLoggerGraphView.java
com.otiasj.memoryLogger.view.OnClickOverlayListener.java
com.otiasj.memoryLogger.view.OnWidgetRefreshListener.java
com.otiasj.memoryLogger.view.OverlayWidget.java
com.otiasj.memoryLogger.view.SystemOverlay.java
com.otiasj.memoryLogger.view.WidgetView.java