title: Firebase on Android: How to check client bandwidth used?
body: <p>I have a large number of users who are particular about cellular data use. I want to do a thorough evaluation of how much bandwidth is consumed by Firebase database in a typical session in my app on the client side.</p>
  
  <p>Is there any way to track Firebase network usage? I have set logging level to debug and can see some connection related messages, but I'd really like to analyze the actual network usage in bytes.</p>
  
  <p>I have already rolled out Firebase on a paid plan, and facing a huge bandwidth bill!</p>
  
  <p><strong><em>Update:</em></strong>
  I created a test app with only Firebase (and no other network component), and used Android Device Monitor - Network Statistics.</p>
  
  <pre><code>// calling this 10 times generated 16 KB traffic
  // size of json actually stored on server was 423 bytes total under ref key
  ref.push().setValue(System.currentTimeMillis());
  
  // later, calling this 10 times generated 20 KB traffic
  ref.addListenerForSingleValueEvent(...);
  </code></pre>