Beispiel #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);
        }
Beispiel #2
0
        static void OnDaemonStarted(string version)
        {
            if (version == null)
            {
                Log.Info("Could not contact daemon -- giving up!");
                main_loop.Quit();
            }

            Daemon.WaitUntilIdle(OnDaemonIdle);
        }
Beispiel #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);
        }
Beispiel #4
0
 static bool Startup()
 {
     Daemon.UseHeapBuddy = heap_buddy;
     Daemon.Start(new Daemon.StartedHandler(OnDaemonStarted));
     return(false);
 }
Beispiel #5
0
 static public void Shutdown()
 {
     Daemon.Shutdown();
     Log.Spew("Test home directory was '{0}'", PathFinder.HomeDir);
     main_loop.Quit();
 }