Skip to content

Commit

Permalink
Extending DNS event reporting
Browse files Browse the repository at this point in the history
This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.

Test: for now just the benchmarking, in the future unit and CTS

Bug: 29748723
Change-Id: Ice7db208282934e74f0e1808ffbae96d476c4216
  • Loading branch information
Michal Karpinski committed Oct 10, 2016
1 parent 77e552d commit 14c9d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ public NetdEventListenerService(ConnectivityManager cm, IpConnectivityLog log) {

@Override
// Called concurrently by multiple binder threads.
public synchronized void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs) {
// This method must not block or perform long-running operations.
public synchronized void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs,
String hostname, String[] ipAddresses, int ipAddressesCount, int uid) {
maybeVerboseLog(String.format("onDnsEvent(%d, %d, %d, %d)",
netId, eventType, returnCode, latencyMs));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public void testConcurrentBatchesAndNetworkLoss() throws Exception {

void log(int netId, int[] latencies) {
for (int l : latencies) {
mNetdEventListenerService.onDnsEvent(netId, EVENT_TYPE, RETURN_CODE, l);
mNetdEventListenerService.onDnsEvent(netId, EVENT_TYPE, RETURN_CODE, l, null, null, 0,
0);
}
}

Expand Down

0 comments on commit 14c9d2d

Please sign in to comment.