Profiler service for Firebase Real Time Database. Runs in App Engine and sends output to Stackdriver and Cloud Storage
-
Generate a service account which has Google Cloud Storage access and save as
serviceAccount.json
-
Create an
.env.local
file with the following values:PROFILING_PROJECT="<- name of the project you want to profile ->" FIREBASE_TOKEN="<- CI token from firebase login:ci ->" GCLOUD_BUCKET="<- name of bucket to upload results to ->"
-
Run
yarn dev
Before Starting: Make sure you have the gcloud
command line tool installed
-
Set up gcloud cli to project:
gcloud config set project my-project
-
Generate a service account which has Google Cloud Storage access and save as
serviceAccount.json
-
Create
env_variables.yaml
which looks like so:env_variables: PROFILING_PROJECT: '<- name of the project you want to profile ->' FIREBASE_TOKEN: '<- CI token from firebase login:ci ->' # Defaults to ${project_id}.appspot.com with id loaded from serviceAccount.json GCLOUD_BUCKET: '<- name of the project you want to profile ->'
NOTE: Account which is used to generate
FIREBASE_TOKEN
must have access to profiling project -
Deploy using
gcloud app deploy