avoid reallocation on test buffers
This commit is contained in:
parent
9a3a2d14e6
commit
9c11fe562c
|
@ -52,6 +52,9 @@ require(["Filer", "util"], function(Filer, util) {
|
|||
test(done);
|
||||
}
|
||||
|
||||
var random_data = new Uint8Array(1024); // 1kB buffer
|
||||
var read_buffer = new Uint8Array(1024);
|
||||
|
||||
function run(iter) {
|
||||
iter = (undefined == iter) ? 0 : iter;
|
||||
|
||||
|
@ -64,8 +67,6 @@ require(["Filer", "util"], function(Filer, util) {
|
|||
function during() {
|
||||
var fs = util.fs();
|
||||
|
||||
var random_data = new Uint8Array(1024); // 1kB buffer
|
||||
var read_buffer = new Uint8Array(1024);
|
||||
window.crypto.getRandomValues(random_data);
|
||||
time(function(done) {
|
||||
fs.mkdir('/tmp', function(err) {
|
||||
|
|
Loading…
Reference in New Issue