use of jakarta.el.StandardELContext in project tomcat by apache.
the class TestScopedAttributeELResolverPerformance method testGetValuePerformance.
/*
* With the caching of NotFound responses this test takes ~20ms. Without the
* caching it takes ~6s.
*/
@Test
public void testGetValuePerformance() throws Exception {
ELContext context = new StandardELContext(ELManager.getExpressionFactory());
context.putContext(JspContext.class, new TesterPageContext());
ELResolver resolver = new ScopedAttributeELResolver();
for (int i = 0; i < 100000; i++) {
resolver.getValue(context, null, "unknown");
}
}
Aggregations