Skip to content

firefox-devtools/profiler-server

Repository files navigation

Firefox profiler server

Matrix

Welcome to the repository for the Firefox profiler server! This server implements some APIs needed by the profiler UI.

Here are some links to know more:

APIs

The APIs are documented in API.md.

Develop and running the server locally

Install the local tooling

You will need a recent enough version of Yarn v1, version 1.10 is known to work correctly. You can install it into your home directory on Linux and probably OS X with:

cd /tmp
wget https://yarnpkg.com/install.sh
chmod a+x install.sh
./install.sh

or follow the instructions specific to your OS on Yarn's website.

Download the profiler code and install its dependencies

To download and prepare the Firefox Profiler server run:

git clone git@github.com:firefox-devtools/profiler-server.git
cd profiler-server
yarn install

For Apple M1 chips

There is an optional dependency that doesn't support M1 chips. Run yarn install --ignore-optional instead to skip installing it.

Configure the server

Then you'll need to configure the server. We use environment variables for this, and the convention of a .env file. Conveniently we provide a file .env.example that you can first copy to .env then edit following the comments inside the file.

Note that the profiler server uses 2 external services: Google Cloud Storage and Bitly and you'll need accounts to use the server's endpoints that need them. Both of them provide free accounts. The documentation in docs-developer/google-storage.md explains further how to configure Google Cloud Storage.

Run the server

Lastly you can run the server with:

yarn start

This will start the server on port 5252.

Build or pull a docker image

We provide a Dockerfile, the very same one we use to build our official docker image. Find more in the dedicated documentation.

Also the images we use for production are public, you can pull latest versions with:

  • for master: docker pull mozilla/profiler-server:master-latest
  • for production: docker pull mozilla/profiler-server:production-latest

Again, look the dedicated documentation to know more.

Discussion

Say hello on Matrix in the Firefox Profiler channel (#profiler:mozilla.org).

License

MPL v2