to top
AFEX APIs
public class

ProcessStatsItem

extends Object
implements Parcelable
java.lang.Object
   ↳ com.ardic.android.parcelables.ProcessStatsItem

Class Overview

Holds data which is related of processes's cpu and memory usage.

Summary

Constants
String CPU_UNIT
String MEM_UNIT
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
ProcessStatsItem(String cpuUsage, String memUsage, String packageName, String userName)
Public Methods
int format(String usage, String units)
Formats passed usage parameter by passed units parameter and returns integer value of usage.
String formatMemUsage()
Formats memory usage attribute in more human readable format.
String getCpuUsage()
String getMemUsage()
String getPackageName()
String getUserName()
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String CPU_UNIT

Added in API level 1

Constant Value: "%"

public static final String MEM_UNIT

Added in API level 1

Constant Value: "K"

Public Constructors

public ProcessStatsItem (String cpuUsage, String memUsage, String packageName, String userName)

Added in API level 1

Parameters
cpuUsage String: Process's cpu usage
memUsage String: Process's memory usage
packageName String: Process's package name
userName String: Process's user id

Public Methods

public int format (String usage, String units)

Added in API level 1

Formats passed usage parameter by passed units parameter and returns integer value of usage.

For example: format("1%", "%")=1 format("8192K", "K")=8192

Parameters
usage String: Usage value in string format
units String: Units character in string format
Returns
int Formatted integer value

public String formatMemUsage ()

Added in API level 1

Formats memory usage attribute in more human readable format.

For example: 8192K memory usage value formatted to 1MB.

Returns
String Memory usage value in human readable format

public String getCpuUsage ()

Added in API level 1

Returns
String Process's cpu usage

public String getMemUsage ()

Added in API level 1

Returns
String Process's memory usage

public String getPackageName ()

Added in API level 1

Returns
String Process's package name

public String getUserName ()

Added in API level 1

Returns
String Process's user id