示例#1
0
        }//TODO: Evolve to current test and tests a/b on individual and across farms

        private int SourceSystemUniqueId_FindByExtendedProperties(string sourceSystemUniqueId)
        {
            AFStopwatch Stopwatch = new AFStopwatch();

            Stopwatch.Start();

            // Act
            var eventFrame = AFEventFrame.FindEventFramesByExtendedProperty(_afDatabase, "SourceSystemId", new[] { sourceSystemUniqueId }, 1).FirstOrDefault().Value;

            //Console.WriteLine(Stopwatch.ElapsedMilliseconds);

            return(Stopwatch.ElapsedMilliseconds);

            //_log.Info($"time: {stopwatch.Elapsed.TotalSeconds}, count: {count}");
        }
示例#2
0
        protected override List <Action> GetActions()
        {
            List <Action> actions = Constants.SourceSystemUniqueIds.Select(sourceSystemUniqueId => (Action)(() =>
            {
                var actionStopwatch = new AFStopwatch();
                actionStopwatch.Start();

                var eventFrames = AFEventFrame.FindEventFramesByExtendedProperty(AfDatabase, "SourceSystemId",
                                                                                 new[] { sourceSystemUniqueId }, 1);
                TestOutput.AddActionResult(
                    new ActionPerformanceResult
                {
                    ActionMillis = actionStopwatch.ElapsedMilliseconds,
                    ResultCount = eventFrames.Count
                });
            })).ToList();

            return(actions);
        }