This commit is contained in:
Sai1919
2016-11-11 12:17:38 +05:30
parent a9cf386642
commit b12059e8f7
2 changed files with 6 additions and 6 deletions

View File

@@ -148,7 +148,7 @@ XmlParser.prototype.parse = function (chunk) {
var index
var xpath
var pathTokens
console.log('***************inside emitInterestedNode name=', name)
// console.log('***************inside emitInterestedNode name=', name)
xpath = state.currentPath.substring(1)
pathTokens = xpath.split('/')
pathTokens.push(name)
@@ -160,7 +160,7 @@ XmlParser.prototype.parse = function (chunk) {
}
if (Array.isArray(tempObj)) tempObj = tempObj[tempObj.length - 1]
scope.emit(name, tempObj)
console.log('*************pushing tempObj on name=', tempObj, name)
// console.log('*************pushing tempObj on name=', tempObj, name)
scope.push(tempObj)
}
@@ -244,7 +244,7 @@ XmlParser.prototype.parse = function (chunk) {
index = temp.indexOf('/')
if (index !== -1) temp = temp.substring(0, index)
if (temp !== name) {
console.log('****************ending the stream as root doesnt match')
// console.log('****************ending the stream as root doesnt match')
scope.end()
}
}
@@ -252,9 +252,9 @@ XmlParser.prototype.parse = function (chunk) {
}
XmlParser.prototype._flush = function (callback) {
console.log('**************inside flush')
// console.log('**************inside flush')
this.parse('', true)
console.log('**************inside flush returned from parse calling callback')
// console.log('**************inside flush returned from parse calling callback')
callback()
}

View File

@@ -1032,7 +1032,7 @@ describe('Tests', function () {
})
})
describe.skip('performance testing', function () {
describe('performance testing', function () {
it('should properly parse more than 500 MB of file.', function (done) {
var parser = new ParserFactory({resourcePath: '/items/item'})
// var wsStream = fs.createWriteStream('./test/TestFiles/MB_and_GB_size_files/MBFile.xml')