Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
  is the website to create and run JavaScript benchmarks. It uses BenchmarkJS (v.2.1.1) as a test runner.

Running at:

How to run MeasureThat on Linux using PostgreSQL:

This blog post explains how to build and run the app on Linux using PostgreSQL:

get started.

Check out the application's source code:

Open the terminal window. Create folder source for the application and check out the code:

$ mkdir source
$ cd source/
$ git clone
Cloning into ''...
remote: Counting objects: 2324, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 2324 (delta 2), reused 0 (delta 0), pack-reused 2305
Receiving objects: 100% (2324/2324), 1.16 MiB | 650.00 KiB/s, done.
Resolving deltas: 100% (1478/1478), done.
Checking connectivity... done.

Build the application

Now everything is ready to build the application. Step into the folder with source code ($ ) and run restore dotnet, npm and bower packages (it will take couple of minutes):

dotnet restore
npm install
bower install

Build frontend:


Build the application:

dotnet build

Build should succeed:


Prepare the configuration file

Open appsettings.json file in the text editor and:

  • Disable External authentication: set UseFacebookAuthentication / UseGoogleAuthentication / UseTwitterAuthentication / UseMicrosoftAuthenticaiton to false (Please let me know in the commens if you want to be able to use External authentication, I can explain how it can be done )
  • Set RequireEmailConfirmation to false
  • Disable reCaptcha: set ReCaptchaEnabled to false.
  • Set database type to PostgreSQL.

Result should look like this:

  "ApplicationInsights": {
    "InstrumentationKey": "6fbb4f00-bf94-4fe8-a0e3-a5b4e1283fc2"
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Debug",
      "System": "Information",
      "Microsoft": "Information"
  "UseFacebookAuthentication": false,
  "UseGoogleAuthentication": false,
  "UseTwitterAuthentication": false,
  "UseMicrosoftAuthenticaiton": false,
  "ResultsConfig": {
    "UploadResultsToDb": true,
    "UploadGuestUserResultsToDb": true
  "GoogleAnalytics": {
    "Enabled": true,
    "Identifier": "UA-83528903-1"
  "AllowGuestUsersToCreateBenchmarks": true,
  "SenderEmail": "",
  "SenderName": "MeasureThat Admin",
  "DatabaseType": "PostgreSQL",
  "RequireEmailConfirmation": false,
  "ReCaptchaEnabled": false 

Prepare the database

Now we need to prepare the database. Switch to postgres user and run the postgres client:

$ sudo -i -u postgres
$ psql

If you need to set the passowrd for the postgres user, enter command the password to do so. This may be needed right after PostgreSQL was installed.

postgres=# \password postgres
Enter new password: 
Enter it again:

Create the database MeasureThat:

postgres=# create database MeasureThat;

You can exit from postgres cleint and switch back to the original user:

postgres=# \q
postgres@vitalii-vm:~$ exit

Set the connection string (using Secret Manager tool):

$ dotnet user-secrets set ConnectionStrings:DefaultConnection 'User ID=postgres;Password=root;Host=localhost;Port=5432;Database=MeasureThat;

Create the database schema:

$ dotnet ef migrations add testPg
Project BenchmarkLab (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
Done. To undo this action, use 'dotnet ef migrations remove'

$ dotnet ef database update
Project BenchmarkLab (.NETCoreApp,Version=v1.0) will be compiled because Input items added from last build
Compiling BenchmarkLab for .NETCoreApp,Version=v1.0
Compilation succeeded.
    0 Warning(s)
    0 Error(s)
Time elapsed 00:00:04.6049020

Run the application

Set the ASPNETCORE_ENVIRONMENT variable to Development


And (drum roll) run the application:

dotnet run