Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



7 Commits

Repository files navigation

In Search Of Lost Time - Code

Project description

This repository contains all code associated with the paper : SoK: In Search of Lost Time: A Review of JavaScript Timers, as well as data used in the paper.

The code is composed of several components:

  • server/: The code for a local Django server. It is used to run client-side experiments in JavaScript. You can find more info on how to run it in the server's README

  • timer_tester: This folder contains all python code used in our experiments, mainly :

    • Tools to download all required versions of browsers.
    • Scripts using Selenium WebDriver used to automate tests on all browsers.
    • Scripts to parse raw data, plot graphs and export csv files.

    You can find more info on how to run it in the timer_tester's README

  • rdtsc: In order to evaluate timers' resolution and measurement overhead with precision, we built custom versions of Firefox and Chromium containing performance.rdtsc, a method calling the native RDTSC instruction to retrieve a high resolution timer. This directory contains patches to apply the changes to the source code of both browsers. You can find more info in RDTSC's README. You can also find pre-built versions of Chromium 81 and Firefox 84 for Linux-x86_64 here

  • data: All the csv files used in the paper for results and graphs. These files were generated using the code in this repository.


To run the code, you must first run the local server. To do so, you need Docker on your system. Please run:

cd server/
docker-compose up

Depending on your docker installation, you might need to run it with sudo. If the docker daemon is not running, you can start it with systemctl start docker More details on the server can be found here.

From now on, you can either access the server directly with your browser at http://localhost:8000 or you can use automated tests.

To run automated tests, you must first install requirements with

cd timer_tester
pip3 install -r requirements.txt

To run tests on Firefox, you must also download GeckoDriver here and set it in your path.

You can then download different browser versions. To download all available versions on both Firefox and Chrome you can run:

cd firefox

cd ../chrome
python3 # As ChromeDrivers work only for a few versions, we must download them automatically.

The downloaded versions are now set in the browser folders. You can also use the downloaders to download only specific versions.

Next, you can run tests with Selenium. For instance, to run all tests on all available Firefox browsers, you can run


In a similar way, to test in Chrome you can run


More information on tests can be found here

Finally, after computing the raw data, you can use scripts to plot graphs used in the paper.

# Plots the hit/miss histogram for a certain version of a browser.
python3 --plot -b $your_browser -v $your_version --clock

# Plots the evolution of the error rate in function of repetitions
python3 --plot -b $your_browser -v $your_version --clock

# Plots the evolution of the number of ticks in a clock period - This shows the changes on jitter and resolution.
python3 -b $your_browser