Iterator i = _templates.values().iterator();
while (i.hasNext())
{
ComponentTemplate template = (ComponentTemplate) i.next();
templateCount++;
int count = template.getTokenCount();
tokenCount += count;
for (int j = 0; j < count; j++)
{
TemplateToken token = template.getToken(j);
if (token.getType() == TokenType.TEXT)
{
TextToken tt = (TextToken) token;
characterCount += tt.getLength();
}
}
}
event.property("parsed templates", templateCount);
event.property("total template tokens", tokenCount);
event.property("total template characters", characterCount);
event.section("Parsed template token counts");
i = _templates.entrySet().iterator();
while (i.hasNext())
{
Map.Entry entry = (Map.Entry) i.next();
String key = entry.getKey().toString();
ComponentTemplate template = (ComponentTemplate) entry.getValue();
event.property(key, template.getTokenCount());
}
}