예제 #1
0
        public static void TestUpdate(DriverLocationIndex i)
        {
            var id = Guid.NewGuid();

            i.AddUser(id, 10, 10);
            var r1 = i.Search(10, 10, 1000);

            var curPos = i._currentUsersLocations[id];

            i.UpdateUser(id, 20, 20);

            var r2 = i.Search(10, 10, 1000);
            var r3 = i.Search(20, 20, 1000);

            var cell = i._currentUsersLocations[id];
        }
예제 #2
0
        public static void TestSearch2(DriverLocationIndex i)
        {
            var from = DateTime.Now;


            var found = i.Search(14.1313, 14.1313, 20000);

            var to = DateTime.Now;

            var least = (to - from).TotalMilliseconds;

            Console.Write(found.Count);
            //35 - 45 ms
            //75 - 90 ms with 1000
            return;
        }