Parse network stats using native code.
Switch to parsing detailed network stats with native code, which is 71% faster than ProcFileReader. Change-Id: I2525aaee74d227ce187ba3a74dd08a2b06514deb
This commit is contained in:
@@ -135,6 +135,18 @@ public class NetworkStats implements Parcelable {
|
||||
builder.append(" operations=").append(operations);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof Entry) {
|
||||
final Entry e = (Entry) o;
|
||||
return uid == e.uid && set == e.set && tag == e.tag && rxBytes == e.rxBytes
|
||||
&& rxPackets == e.rxPackets && txBytes == e.txBytes
|
||||
&& txPackets == e.txPackets && operations == e.operations
|
||||
&& iface.equals(e.iface);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public NetworkStats(long elapsedRealtime, int initialSize) {
|
||||
|
||||
Reference in New Issue
Block a user