


var parser3 = require("../src/parserV3");
var parser2 = require("../src/parserV2");
var parser = require("../src/parser");
var xml2js = require("xml2js");

var fs = require("fs");
var path = require("path");
var fileNamePath = path.join(__dirname, "../spec/assets/large.xml");
var xmlData = fs.readFileSync(fileNamePath).toString();

var beforeTime = new Date();
xml2js.parseString(xmlData,function(err,result){
    if (err) throw err;
    var endTime = new Date();
    console.log(endTime - beforeTime);
    //console.log(result.any_name.person[3].name);
    //console.log(JSON.stringify(result,null,4));
});


var beforeTime = new Date();
parser2.parse(xmlData);
var endTime = new Date();
console.log(endTime - beforeTime);

var beforeTime = new Date();
parser3.parse(xmlData);
var endTime = new Date();
console.log(endTime - beforeTime);

var beforeTime = new Date();
parser.validate(xmlData);
var endTime = new Date();
console.log(endTime.getMilliseconds() - beforeTime.getMilliseconds());

var beforeTime = new Date();
parser.parse(xmlData);
var endTime = new Date();
console.log(endTime.getMilliseconds() - beforeTime.getMilliseconds());
@@ -1,91 +1,7 @@
 %0A%0A%0A
-var parser3 = require(%22../src/parserV3%22);%0Avar parser2 = require(%22../src/parserV2%22);%0A
 var 
@@ -523,17 +523,16 @@
 );%0A%7D);%0A%0A
-%0A
 var befo
@@ -562,14 +562,16 @@
 rser
-2.pars
+.validat
 e(xm
@@ -675,17 +675,16 @@
 ;%0Aparser
-3
 .parse(x
@@ -756,307 +756,4 @@
 me);
-%0A%0Avar beforeTime = new Date();%0Aparser.validate(xmlData);%0Avar endTime = new Date();%0Aconsole.log(endTime.getMilliseconds() - beforeTime.getMilliseconds());%0A%0Avar beforeTime = new Date();%0Aparser.parse(xmlData);%0Avar endTime = new Date();%0Aconsole.log(endTime.getMilliseconds() - beforeTime.getMilliseconds());

update large file perf test