Ind.ie is now Small Technology Foundation.
Commit 5ff88d0f authored by bmcminn's avatar bmcminn

updated network profile throughput maths to match chromium network profile spec

parent b698d9d8
var Mb = 100000; // 1 million Bytes in a Megabyte
var Kb = 1000; // 1 thousand Bytes in a Kilobyte
// Memory scalar constants
var Mb = 1024 * 1024 / 8;
var Kb = 1024 / 8;
/**
* List of enumerated latency profiles
......@@ -10,42 +10,42 @@ var Kb = 1000; // 1 thousand Bytes in a Kilobyte
module.exports = {
WIFI: {
latency: 2,
downloadThroughput: 30*Mb,
uploadThroughput: 15*Mb
downloadThroughput: 30 * Mb,
uploadThroughput: 15 * Mb
},
DSL: {
latency: 5,
downloadThroughput: 2*Mb,
uploadThroughput: 1*Mb
downloadThroughput: 2 * Mb,
uploadThroughput: 1 * Mb
},
REGULAR_4G: {
latency: 20,
downloadThroughput: 4*Mb,
uploadThroughput: 3*Mb
downloadThroughput: 4 * Mb,
uploadThroughput: 3 * Mb
},
GOOD_3G: {
latency: 40,
downloadThroughput: 1*Mb,
uploadThroughput: 750*Kb
downloadThroughput: 1 * Mb,
uploadThroughput: 750 * Kb
},
REGULAR_3G: {
latency: 100,
downloadThroughput: 750*Kb,
uploadThroughput: 250*Kb
downloadThroughput: 750 * Kb,
uploadThroughput: 250 * Kb
},
GOOD_2G: {
latency: 150,
downloadThroughput: 450*Kb,
uploadThroughput: 150*Kb
downloadThroughput: 450 * Kb,
uploadThroughput: 150 * Kb
},
REGULAR_2G: {
latency: 300,
downloadThroughput: 250*Kb,
uploadThroughput: 50*Kb
downloadThroughput: 250 * Kb,
uploadThroughput: 50 * Kb
},
GPRS: {
latency: 500,
downloadThroughput: 50*Kb,
uploadThroughput: 20*Kb,
downloadThroughput: 50 * Kb,
uploadThroughput: 20 * Kb,
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment