Firebase
Products
Use Cases
Pricing
Docs
Support
Home
Products
Use Cases
Pricing
Docs
Support
The Firebase Blog
Profiling your Realtime Database Performance
March 14, 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)
►
March
(2)
►
February
(2)
►
January
(1)
►
2021
(41)
►
November
(3)
►
October
(4)
►
September
(4)
►
August
(7)
►
July
(6)
►
June
(4)
►
May
(3)
►
April
(2)
►
March
(2)
►
February
(3)
►
January
(3)
►
2020
(39)
►
December
(1)
►
November
(4)
►
October
(8)
►
September
(4)
►
August
(6)
►
July
(3)
►
June
(4)
►
May
(2)
►
March
(3)
►
February
(1)
►
January
(3)
►
2019
(31)
►
December
(1)
►
November
(4)
►
September
(4)
►
August
(2)
►
July
(3)
►
June
(1)
►
May
(1)
►
April
(4)
►
March
(7)
►
February
(2)
►
January
(2)
►
2018
(55)
►
December
(3)
►
November
(8)
►
October
(1)
►
September
(6)
►
August
(9)
►
July
(1)
►
June
(5)
►
May
(5)
►
April
(4)
►
March
(7)
►
February
(2)
►
January
(4)
▼
2017
(86)
►
December
(10)
►
November
(6)
►
October
(5)
►
September
(6)
►
August
(9)
►
July
(6)
►
June
(7)
►
May
(8)
►
April
(5)
▼
March
(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
►
February
(9)
►
January
(5)
►
2016
(66)
►
December
(6)
►
November
(11)
►
October
(9)
►
September
(9)
►
August
(6)
►
July
(6)
►
June
(7)
►
May
(3)
►
April
(1)
►
March
(1)
►
February
(4)
►
January
(3)
►
2015
(24)
►
December
(2)
►
November
(1)
►
October
(4)
►
September
(1)
►
August
(2)
►
July
(2)
►
May
(4)
►
April
(1)
►
March
(5)
►
February
(1)
►
January
(1)
►
2014
(29)
►
December
(3)
►
November
(3)
►
October
(3)
►
September
(1)
►
August
(2)
►
July
(2)
►
June
(1)
►
May
(4)
►
April
(4)
►
March
(2)
►
February
(1)
►
January
(3)
►
2013
(28)
►
December
(3)
►
November
(2)
►
October
(2)
►
September
(1)
►
August
(2)
►
July
(2)
►
June
(3)
►
May
(1)
►
April
(3)
►
March
(6)
►
February
(2)
►
January
(1)
►
2012
(8)
►
December
(2)
►
October
(1)
►
September
(1)
►
July
(1)
►
June
(1)
►
April
(2)
Recent Posts