예제 #1
0
        public void Run()
        {
            count            = 0;
            cycles_remaining = GetCycles();
            start_time       = DateTime.Now;

            // We start by verifying the index, to make sure we
            // are in a reasonable state.
            Daemon.WaitUntilVerified(root, verified_handler);
        }
예제 #2
0
        static void OnDaemonStarted(string version)
        {
            if (version == null)
            {
                Log.Info("Could not contact daemon -- giving up!");
                main_loop.Quit();
            }

            Daemon.WaitUntilIdle(OnDaemonIdle);
        }
예제 #3
0
        private bool AbuseWorker()
        {
            // Pick a hammer, and use it.
            int i;

            i = random.Next(hammers.Length);
            if (!hammers [i].HammerOnce(root, tracker))
            {
                return(false);
            }

            --cycles_remaining;
            if (cycles_remaining == 0)
            {
                cycles_remaining = GetCycles();
                ++count;

                // Verify the index
                Daemon.WaitUntilVerified(root, verified_handler);
                return(false);
            }

            return(true);
        }
예제 #4
0
 static bool Startup()
 {
     Daemon.UseHeapBuddy = heap_buddy;
     Daemon.Start(new Daemon.StartedHandler(OnDaemonStarted));
     return(false);
 }
예제 #5
0
 static public void Shutdown()
 {
     Daemon.Shutdown();
     Log.Spew("Test home directory was '{0}'", PathFinder.HomeDir);
     main_loop.Quit();
 }