Firebase Realtime Database Operation Types

Firebase Realtime Database profiler command

Profile the Realtime Database and generate a report based on speed and bandwidth usage of operations with the following command:

firebase database:profile
Options
-h, --help Output usage information
-o, --output <filename> Save the output to the specified file
-i, --intput <filename> Generate the report based on the specified file instead of stream logs from the server
-d, --duration <seconds> Collect database usage information for the specified number of seconds
--raw Output the raw stats collected as new-line delimited JSON

Operation types

concurrent-connect

This operation reflects realtime connections to the database (for example, when a new client connects via an SDK). RESTful connections are not reflected in concurrent-connect operations.

{
    "name": "concurrent-connect",
    "timestamp": 1484776334900
}

concurrent-disconnect

Concurrent-disconnects reflect a connection that has disconnected from the database (for example, when a client disconnects or signs off).

{
    "name": "concurrent-disconnect",
    "timestamp": 1484776341844
}

realtime-write

Write requests from realtime connections. For example, set() and push() operations for web clients. Delete requests are also counted as realtime-write operations, and reflect writes of 0 bytes.

{
    "allowed": true, // If security rules allow the operation
    "bytes": 1,
    "millis": 2,
    "name": "realtime-write",
    "path": [
        "foo"
    ],
    "timestamp": 1484776538763
}

realtime-transaction

This operation type includes transactions conducted through realtime connections. Repeat transactions may be the result of failed attempts and retries.

{
    "allowed": true,
    "bytes": 20,
    "millis": 2,
    "name": "realtime-transaction",
    "path": [
        "foo"
    ],
    "timestamp": 1484776854610
}

realtime-update

These realtime operations for updates reflect overwites of specific data, not the more general write operations in realtime-write.

{
    "allowed": true,
    "bytes": 5,
    "millis": 2,
    "name": "realtime-update",
    "path": [
        "foo"
    ],
    "timestamp": 1484776538769
}

listener-listen

These operations reflect the initial ask for data at a specific location from a client. For example, the on() or once() methods for web clients.

{
    "allowed": true,
    "bytes": 0,
    "millis": 26,
    "name": "listener-listen",
    "path": [
        "foo"
    ],
    "querySet": [],
    "timestamp": 1484776335024,
    "unIndexed": false
}

listener-broadcast

This operation covers the data sent from the server to any and all clients that are listening at a given location following every write and update operation. The change to the data leads to a broadcast operation. However, you may see 0 updates if there aren't any clients listening.

{
    "bytes": 56, // Total bytes sent across clients
    "clientsUpdated": 3, // This may be 0 if no clients are listening
    "millis": 17,
    "name": "listener-broadcast",
    "path": [
        "baz",
        "mar"
    ],
    "timestamp": 1484775969928
}

listener-unlisten

These operations reflect listening clients that sign off or stop listening through the detach methods (for example, off() for web, or removeAllObservers for iOS).

{
    "name": "listener-unlisten",
    "path": [
        "foo"
    ],
    "timestamp": 1484776335044
}

rest-read

GET requests through the REST API.

{
    "allowed": true,
    "bytes": 348, // This would be 0 if the read data was null
    "millis": 26,
    "name": "rest-read",
    "path": [],
    "querySet": [
        {
            "default": true,
            "endIndexValue": "[MAX_NAME]",
            "equality": false,
            "index": {},
            "limit": null,
            "range": false,
            "simpleLimit": false,
            "startIndexValue": "[MIN_NAME]",
            "viewFrom": null
        }
    ],
    "timestamp": 1484775747416
}

rest-write

PUT and POST requests through the REST API. DELETE requests reflect rest-write operations of 0 bytes.

{
    "allowed": true,
    "bytes": 13,
    "millis": 116,
    "name": "rest-write",
    "path": [],
    "timestamp": 1484775917216
}

rest-update

Updates through the REST API reflect PATCH requests.

{
    "allowed": true,
    "bytes": 5,
    "millis": 11,
    "name": "rest-update",
    "path": [
        "baz",
        "mar"
    ],
    "timestamp": 1484775969930
}

Send feedback about...

Need help? Visit our support page.