Firebase on Android: How to check client bandwidth used?
Asked Answered
S

0

7

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.

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.

I have already rolled out Firebase on a paid plan, and facing a huge bandwidth bill!

Update: I created a test app with only Firebase (and no other network component), and used Android Device Monitor - Network Statistics.

// 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(...);
Schedule answered 19/6, 2016 at 15:15 Comment(1)
In a test environment the Android Studio Network Monitor gives a high-level view of network usage. It's not the detailed byte counts you're looking for but might be helpful.Jutta

© 2022 - 2024 — McMap. All rights reserved.