Mesh Delivery SDK exposes a `fetchStats` method which can be used as follows on an initialized SDK instance:
dnaClient.fetchStats(new InformationCallback() {
@Override
public void onStats(State state, long cdn, long dna, long upload, int peers) {
// Process the stats here
}
});
With the Java 8 lambda feature, it is even more simple:
dnaClient.fetchStats((state, cdn, dna, upload, peer) -> {
// Process the stats here
});
cdn: Traffic downloaded from the CDN (cumulated bytes).
dna: Traffic downloaded from the mesh network (cumulated bytes).
upload: Traffic uploaded to the mesh network (cumulated bytes).