Skip to content

Instantly share code, notes, and snippets.

@thefotios
Created August 26, 2016 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefotios/ee48eab2c4eb7f40da9cf833597b67d5 to your computer and use it in GitHub Desktop.
Save thefotios/ee48eab2c4eb7f40da9cf833597b67d5 to your computer and use it in GitHub Desktop.
Backpopulation Time
const MEDIA_ITEMS = 90e6;
const WORKERS = 1;
const operationTime = {
render: 20,
network: 500,
};
const msPerOperation = Object.keys(operationTime).reduce((cur, key) => cur += operationTime[key], 0);
const DAY_IN_MS = 24 * 60 * 60 * 1000;
const operationsPerDay = DAY_IN_MS / msPerOperation;
MEDIA_ITEMS / operationsPerDay / WORKERS ///Days it would take
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment