Firebase
Products
Use Cases
Pricing
Docs
Support
Home
Products
Use Cases
Pricing
Docs
Support
The Firebase Blog
Profiling your Realtime Database Performance
14. ožujka 2017.
Tyler Rockwood
Software Engineer
The Firebase Realtime Database has traditionally been a black box that doesn't really give you a lot of insight into its performance. We're changing that. Today, you'll be able to get insights into how your database instance is performing by using the
profiler built into the Firebase CLI
. You can now easily monitor your database writes and reads at the path level, collecting granular data on bandwidth usage and speed.
To start, make sure you have the latest version of the
Firebase CLI
installed and initialized. Start profiling using the database:profile command.
firebase database:profile
This will start streaming operations from your Realtime Database. When you press enter, the CLI aggregates the collected data into a summary table broken down into three main categories: speed, bandwidth and unindexed queries. Speed and bandwidth reports are further broken down by the operation type (write or read) and the path in your Realtime Database. If you have a location with more than 25 children (for example, if you're using .push in the SDKs), the summary table collapses those paths into a single entry and replaces the push ids with $wildcard.
Speed*
This table displays 4 items: the path, the number of times that location has been hit, the number of milliseconds it took for the server to process the request, and the number of times that the path has been denied by rules.
Bandwidth**
The table displays 3 items: the path, the total amount of bandwidth for the path, and the average bandwidth per operation.
Unindexed Queries
This shows 3 things: the path, the index rule that should be added to your rules, and the number of times the location has been queried. Warnings for these queries also show up in the SDK logs.
What if this isn't enough?
You can also collect the raw operations from your server by using the --raw flag (you'll probably also want to specify an output file with --output), to get more detailed information like ip addresses and user agent strings for connected applications. See the
profiler reference page
for a complete list of possible operations you can collect information about and what they show.
* Speeds are reported at millisecond resolution and refers to the time it takes for the database to process an operation. However, you may see vastly different latencies depending on network conditions and numerous other factors.
** Bandwidth is an estimate based on the data payload and is not a valid measure of the billable amount. Values here could be over or under your actual billed bandwidth, and the stats sent by the profiler also count towards your bandwidth bill.
About
Firebase gives you the tools and infrastructure to build better apps and grow successful businesses.
Learn more
Popular Posts
Introducing Cloud Firestore: Our New Document Database for Apps
Best Practices: Arrays in Firebase
The beginners guide to React Native and Firebase
Firebase expands to become a unified app platform
Email Verification in Firebase Auth
Archive
►
2022
(5)
►
ožujka
(2)
►
veljače
(2)
►
siječnja
(1)
►
2021
(41)
►
studenoga
(3)
►
listopada
(4)
►
rujna
(4)
►
kolovoza
(7)
►
srpnja
(6)
►
lipnja
(4)
►
svibnja
(3)
►
travnja
(2)
►
ožujka
(2)
►
veljače
(3)
►
siječnja
(3)
►
2020
(39)
►
prosinca
(1)
►
studenoga
(4)
►
listopada
(8)
►
rujna
(4)
►
kolovoza
(6)
►
srpnja
(3)
►
lipnja
(4)
►
svibnja
(2)
►
ožujka
(3)
►
veljače
(1)
►
siječnja
(3)
►
2019
(31)
►
prosinca
(1)
►
studenoga
(4)
►
rujna
(4)
►
kolovoza
(2)
►
srpnja
(3)
►
lipnja
(1)
►
svibnja
(1)
►
travnja
(4)
►
ožujka
(7)
►
veljače
(2)
►
siječnja
(2)
►
2018
(55)
►
prosinca
(3)
►
studenoga
(8)
►
listopada
(1)
►
rujna
(6)
►
kolovoza
(9)
►
srpnja
(1)
►
lipnja
(5)
►
svibnja
(5)
►
travnja
(4)
►
ožujka
(7)
►
veljače
(2)
►
siječnja
(4)
▼
2017
(86)
►
prosinca
(10)
►
studenoga
(6)
►
listopada
(5)
►
rujna
(6)
►
kolovoza
(9)
►
srpnja
(6)
►
lipnja
(7)
►
svibnja
(8)
►
travnja
(5)
▼
ožujka
(10)
Using Firebase Cloud Messaging with Android O
How to Schedule (Cron) Jobs with Cloud Functions f...
BigQuery Tip: The UNNEST Function
Take Control of Your Firebase Init on Android
Profiling your Realtime Database Performance
Multiplying the Power of Firebase Storage
Introducing Cloud Functions for Firebase
Working Closer with Google Cloud Platform
Updates to Firebase Notifications: Reach your user...
Realtime Analytics For Everyone
►
veljače
(9)
►
siječnja
(5)
►
2016
(66)
►
prosinca
(6)
►
studenoga
(11)
►
listopada
(9)
►
rujna
(9)
►
kolovoza
(6)
►
srpnja
(6)
►
lipnja
(7)
►
svibnja
(3)
►
travnja
(1)
►
ožujka
(1)
►
veljače
(4)
►
siječnja
(3)
►
2015
(24)
►
prosinca
(2)
►
studenoga
(1)
►
listopada
(4)
►
rujna
(1)
►
kolovoza
(2)
►
srpnja
(2)
►
svibnja
(4)
►
travnja
(1)
►
ožujka
(5)
►
veljače
(1)
►
siječnja
(1)
►
2014
(29)
►
prosinca
(3)
►
studenoga
(3)
►
listopada
(3)
►
rujna
(1)
►
kolovoza
(2)
►
srpnja
(2)
►
lipnja
(1)
►
svibnja
(4)
►
travnja
(4)
►
ožujka
(2)
►
veljače
(1)
►
siječnja
(3)
►
2013
(28)
►
prosinca
(3)
►
studenoga
(2)
►
listopada
(2)
►
rujna
(1)
►
kolovoza
(2)
►
srpnja
(2)
►
lipnja
(3)
►
svibnja
(1)
►
travnja
(3)
►
ožujka
(6)
►
veljače
(2)
►
siječnja
(1)
►
2012
(8)
►
prosinca
(2)
►
listopada
(1)
►
rujna
(1)
►
srpnja
(1)
►
lipnja
(1)
►
travnja
(2)
Recent Posts