SpEL API polishing

This commit is contained in:
eeichinger
2009-10-14 16:28:18 +00:00
parent 921cddbe2e
commit f00f3afcc3
55 changed files with 378 additions and 353 deletions

View File

@@ -97,27 +97,22 @@ namespace Spring.Expressions
str.Text = "theArg";
fn.addChild(str);
IExpression exp = fn;
string result = str.Text;
// string result = string.Format("{0},{1},{2}", this.GetHashCode(), str.Text, str2.Text);
int ITERATIONS = 1000000;
int ITERATIONS = 10000000;
StopWatch watch = new StopWatch();
// using (watch.Start("Duration Direct: {0}"))
// {
// for (int i = 0; i < ITERATIONS; i++)
// {
// noop(str.getText());
// }
// }
using (watch.Start("Duration Direct: {0}"))
{
for (int i = 0; i < ITERATIONS; i++)
{
((WaitCallback)vars["noop"])(str.getText());
}
}
using (watch.Start("Duration SpEL: {0}"))
{
for (int i = 0; i < ITERATIONS; i++)
{
exp.GetValue(null, vars);
fn.GetValue(null, vars);
}
}
}