Commit d7477326 authored by Alexandra Rogova's avatar Alexandra Rogova

added test content, small changes

parent 36737b80
......@@ -5,7 +5,7 @@ const args = require("yargs")
.demandOption(['file'])
.alias("f", "file")
.alias("u", "uncompressed")
.aliad("b", "bulk")
.alias("b", "bulk")
.describe("file", "file containing the index")
.describe("uncompressed", "to add if file is uncompressed ! For testing only !")
.describe("bulk", "adds items to db in bulk. Much faster but still in testing")
......
......@@ -32,11 +32,9 @@ function runScriptSync(list, callback) {
fs.truncateSync("./results/import_content.csv");
stream.write("items,time \n");
var to_run = [{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 100000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 50000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 10000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 5000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 1000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml"], amount : 100}];
var to_run = [{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content100000.zip"], amount : 100000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content10000.zip"], amount : 10000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content1000.zip"], amount : 1000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content100.zip"], amount : 100}];
runScriptSync(to_run, function (err) {if (err) throw err;});
......@@ -32,11 +32,9 @@ function runScriptSync(list, callback) {
fs.truncateSync("./results/import_content_bulk.csv");
stream.write("items,time \n");
var to_run = [{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 100000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 50000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 10000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 5000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 1000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/.xml", '-b'], amount : 100}];
var to_run = [{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content100000.zip", '-b'], amount : 100000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content10000.zip", '-b'], amount : 10000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content1000.zip", '-b'], amount : 1000},
{scriptPath : './import_content.js', args : ['-f' ,"./test_files/CONTENT/content100.zip", '-b'], amount : 100}];
runScriptSync(to_run, function (err) {if (err) throw err;});
items,time
100,3.05
1000,26.538
10000,333.06
items,time
100,3.087
1000,29.468
5000,164.876
10000,333.428
100,2.861
1000,28.462
5000,183.947
10000,364.987
50000,2023.26
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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