I was wondering if there was an easy way to measure data usage by your meteor app. I have an app built with Meteor that is being used a lot on wifi hot spots. The data usage appears to be much, much more than what I would expect from the app. It would be good if I could simulate the app’s usage on my local development machine and record how much data was downloaded to the browser over the course of the session (not just the initial page load). Is there an easy way to do this? Thanks!
Also interested in this!
Why is the network-tab in the development console not enough? You can just measure the total amount of data there?
I’m not too familiar with all the details of that tab, but does it measure DDP data too, or just initial page load?
Did you checkout Kadira?
Chrome does show the Websocket traffic in the network tab, but it does not count the traffic there, unfortunatly. Maybe there is an extension for that.
Luc, I have Kadira installed on my app, but honestly have hardly used it since this app is internal and performance isn’t an issue. My impression though with Kadira is the analytics it provides are focused on I/O speed and tracking errors? Maybe @arunoda could comment here. I checked briefly on Kadira’s website before responding, and didn’t see any features focusing on data usage metrics.
Ah seems you are right. If you know the average document size you can make some estimates and off course you can correlate more documents is more data.
For more specific measurements on your local machine you can use: http://www.telerik.com/fiddler which can act as a proxy. So it can be put between meteor and your browser. That should give you an indication and more precise measurements.
If you then run end to end tests with something like Chimp you can reproduce the data usage and optimize.
Don’t you have an idea where most data is consumed? Do you think too much calls are being made or that the documents are too big?
Edit: https://meteorhacks.com/discover-meteor-ddp-in-realtime.html may also be interesting.
It was actually an issue of us going over the data limits on a cell plan, but I wanted to confirm it wasn’t the app causing it - the limits were in the GB range, and I wouldn’t expect a meteor app to consume more than the low 100s of mbs. This was during our peak season, so the problem is no longer an issue. However, I’d be curious in the future to circle back around to this. It was also something that would be useful knowledge for reference with future apps.
The only issue I can think of when you have normal sized documents and amounts which are reasonable would be a loop. That could constantly trigger DDP. You would catch it with kadira and it would also slow down everything so I expect it won’t come by surprise.
For your use case the amount of subscriptions, documents etc is actually a good enough monitoring number.
I was going cap’n mode, trying to search npm modules and accidently fell into chinese black hat forums.
Its pretty dangerous to search traffic analysis tools nowadays I’m passing out
But really, try to find related npm and python tools. (be careful though)