private static void PerformanceTestIdentNode() { var bidData = new BidData("IBM", 0L, 0.50); var identNode1 = new ExprIdentNodeImpl("BidPrice"); var bidDataEventType = _espServiceProvider.EventAdapterService.GetEventTypeByName("BidData"); var streamTypeService = new StreamTypeServiceImpl(bidDataEventType, null, false, null); identNode1.Validate( new ExprValidationContext( _container, streamTypeService, null, null, null, null, null, null, null, null, null, -1, null, null, null, false, false, false, false, null, false )); var exprEvaluatorContext = (ExprEvaluatorContext)null; Console.WriteLine("IdentNode"); for (var nn = 0; nn < 10; nn++) { var eventBean = new BeanEventBean(bidData, bidDataEventType); var eventBeans = new EventBean[] { eventBean }; var timeItem = PerformanceObserver.TimeMicro( delegate { for (var ii = 1000000; ii >= 0; ii--) { identNode1.ExprEvaluator.Evaluate( new EvaluateParams(eventBeans, false, exprEvaluatorContext)); } }); Console.WriteLine("time: {0} {1:N3} {2:N3}", timeItem, timeItem / 1000000.0m, 1000000.0m / timeItem); } }
public static OuterJoinDesc MakeDesc(String propOne, String streamOne, String propTwo, String streamTwo, OuterJoinType type) { ExprIdentNode identNodeOne = new ExprIdentNodeImpl(propOne, streamOne); ExprIdentNode identNodeTwo = new ExprIdentNodeImpl(propTwo, streamTwo); ExprValidationContext context = SupportExprValidationContextFactory.Make(new SupportStreamTypeSvc3Stream()); identNodeOne.Validate(context); identNodeTwo.Validate(context); OuterJoinDesc desc = new OuterJoinDesc(type, identNodeOne, identNodeTwo, null, null); return(desc); }
public static OuterJoinDesc MakeDesc( IContainer container, string propOne, string streamOne, string propTwo, string streamTwo, OuterJoinType type) { ExprIdentNode identNodeOne = new ExprIdentNodeImpl(propOne, streamOne); ExprIdentNode identNodeTwo = new ExprIdentNodeImpl(propTwo, streamTwo); var context = SupportExprValidationContextFactory.Make( container, new SupportStreamTypeSvc3Stream(SupportEventTypeFactory.GetInstance(container))); identNodeOne.Validate(context); identNodeTwo.Validate(context); var desc = new OuterJoinDesc(type, identNodeOne, identNodeTwo, null, null); return(desc); }