Class Overview
Holds data which is related of processes's cpu and memory usage.
Summary
[Expand]
Inherited Constants |
From interface
android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_ELIDE_DUPLICATES |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
android.os.Parcelable
abstract
int
|
describeContents()
|
abstract
void
|
writeToParcel(Parcel arg0, int arg1)
|
|
Constants
public
static
final
String
CPU_UNIT
public
static
final
String
MEM_UNIT
Public Constructors
public
ProcessStatsItem
(String cpuUsage, String memUsage, String packageName, String userName)
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)
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
()
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
()
Returns |
String |
Process's cpu usage
|
public
String
getMemUsage
()
Returns |
String |
Process's memory usage
|
public
String
getPackageName
()
Returns |
String |
Process's package name
|
public
String
getUserName
()
Returns |
String |
Process's user id
|