3

My app is sending roughly 5mb a day, where as my calculations of what it should be were closer to less than 100kb. So somewhere something is going very wrong or I am misunderstanding something. Is there any way to log the size of the firebase data going in and out as it happens? Otherwise, any other debugging ideas?

Every 2 mins this fires:

 long nowMili = now.getTimeInMillis();
 double lat = location.getLatitude();
 double lng = location.getLongitude();
 Map<String, String> locationRec = new HashMap<>();
 locationRec.put("time", String.valueOf(nowMili));
 locationRec.put("lat", String.valueOf(lat));
 locationRec.put("lng", String.valueOf(lng));
 Firebase locationRecRef = new Firebase(FB.FBRef + "/locator/" + User.currentGroup + "/"  + FB.uid);
 locationRecRef.setValue(locationRec);

What the data typically looks like:

"Locations":{
  [groupName]:{
    [user]:{
      lat: "175.48598907719583",
      lng: "-37.99470968516994",
      time: "1454707169089"
     },
  },
}
Marty.H
  • 1,194
  • 4
  • 16
  • 29
  • Not really sure what code would help but I'll post some anyway. – Marty.H Feb 05 '16 at 21:05
  • 3
    android studio has a built-in network monitor. – eriuzo Feb 05 '16 at 22:11
  • 2
    If you call `Firebase.getDefaultConfig().setLogLevel(Level.DEBUG)` at the start of you app, you can see what that client is sending to/receiving from Firebase. – Frank van Puffelen Feb 05 '16 at 22:28
  • You'll see that it sends paths in addition to the data, that there's keep-alive messages and more. With that information and http://bit.ly/firebase-bandwidth, you should be able to get a reasonable estimate. – Frank van Puffelen Feb 06 '16 at 16:13
  • Thanks Frank, that helps a lot. Also, can you let me know roughly how big you would expect a key/value pair like this to be? `eb5b3405-631d-4d9f-b5f1-405590e9d739: "19:04"` My test results are showing it should be roughly 1.5kb, where as I thought it it was 1 byte per charcter. – Marty.H Feb 06 '16 at 19:35

0 Answers0