Skip to content
Snippets Groups Projects
Commit d1156dc5 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

enable measurements in xml parsing

parent be20dd83
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
#include <sstream>
#include <deque>
#include "ComposerException.h"
#include "../measure"
 
namespace sax {
 
......@@ -51,7 +52,7 @@ void SaxComposeInterface::printStream(std::ostream& out, const std::deque<Token>
}
 
void SaxComposeInterface::xmlSAXUserPrint(xmlTextWriterPtr writer, const std::deque<Token>& in) {
// measurements::start("Sax Composer", measurements::Type::FINALIZE);
measurements::start("Sax Composer", measurements::Type::FINALIZE);
xmlTextWriterStartDocument(writer, NULL, NULL, NULL);
#ifdef DEBUG
std::deque<Token> stack;
......@@ -94,7 +95,7 @@ void SaxComposeInterface::xmlSAXUserPrint(xmlTextWriterPtr writer, const std::de
}
}
xmlTextWriterEndDocument(writer);
// measurements::end();
measurements::end();
}
 
} /* namespace sax */
......
......@@ -13,6 +13,7 @@
#include <iostream>
#include <algorithm>
#include "../exception/CommonException.h"
#include "../measure"
 
namespace sax {
 
......@@ -54,7 +55,7 @@ void SaxParseInterface::parseStream(std::istream& in, std::deque<Token>& out) {
 
int SaxParseInterface::xmlSAXUserParse(xmlTextReaderPtr reader, std::deque<Token>& out) {
int ret = xmlTextReaderRead(reader);
// measurements::start("Sax Parser", measurements::Type::INIT);
measurements::start("Sax Parser", measurements::Type::INIT);
while (ret == 1) {
xmlChar* name = xmlTextReaderName(reader);
xmlChar* value;
......@@ -91,7 +92,7 @@ int SaxParseInterface::xmlSAXUserParse(xmlTextReaderPtr reader, std::deque<Token
 
ret = xmlTextReaderRead(reader);
}
// measurements::end();
measurements::end();
return ret;
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment