ShowHelp() public method

public ShowHelp ( ) : void
return void
Ejemplo n.º 1
0
    public static int Main(string []args)
    {
      Parameters p = new Parameters("Simulator", "Simulator - Brunet Time Based Simulator");
      if(p.Parse(args) != 0) {
        Console.WriteLine(p.ErrorMessage);
        p.ShowHelp();
        return -1;
      } else if(p.Help) {
        p.ShowHelp();
        return -1;
      }

      Simulator sim = new Simulator(p);

      if(p.Complete) {
        sim.Complete();
      } else if(p.Evaluation) {
        DateTime now = DateTime.UtcNow;
        sim.Complete();
        SimpleTimer.RunSteps(p.EvaluationTime, false);
        sim.Complete();
        Console.WriteLine("Time spent setting up: " + (DateTime.UtcNow - now).ToString());
        sim.AllToAll();
        sim.Crawl();
      } else if(p.HeavyChurn) {
        HeavyChurn(sim, p.EvaluationTime);
      } else {
        Commands(sim);
      }
       return 0;
    }
Ejemplo n.º 2
0
        public static int Main(string [] args)
        {
            Parameters p = new Parameters("RelayOverlapSimulator", "Brunet Time Based Simulator for Relays");

            if (p.Parse(args) != 0)
            {
                Console.WriteLine(p.ErrorMessage);
                p.ShowHelp();
                return(-1);
            }
            else if (p.Help)
            {
                p.ShowHelp();
                return(-1);
            }

            RelayOverlapSimulator sim = new RelayOverlapSimulator(p);

            sim.Complete(false);
            if (p.Evaluation)
            {
                Evaluator(sim);
            }
            else
            {
                Simulator(sim);
            }

            return(0);
        }
Ejemplo n.º 3
0
    public static int Main(string []args)
    {
#if SUBRING
      SubringParameters p = new SubringParameters();
#else
      Parameters p = new Parameters("Simulator", "Simulator - Brunet Time Based Simulator");
#endif
      if(p.Parse(args) != 0) {
        Console.WriteLine(p.ErrorMessage);
        p.ShowHelp();
        return -1;
      } else if(p.Help) {
        p.ShowHelp();
        return -1;
      }

#if SUBRING
      SubringSimulator sim = new SubringSimulator(p);
#else
      Simulator sim = new Simulator(p);
#endif

      if(p.Complete) {
        sim.Complete();
      } else if(p.Broadcast > -2) {
        Broadcast(sim, p.Broadcast);
      } else if(p.HeavyChurn > 0) {
        HeavyChurn(sim, p.HeavyChurn);
      } else if(p.Evaluation) {
        Evaluate(sim, p);
      } else {
        Commands(sim);
      }
      return 0;
    }
Ejemplo n.º 4
0
        public static int Main(string [] args)
        {
#if SUBRING
            SubringParameters p = new SubringParameters();
#else
            Parameters p = new Parameters("Simulator", "Simulator - Brunet Time Based Simulator");
#endif
            if (p.Parse(args) != 0)
            {
                Console.WriteLine(p.ErrorMessage);
                p.ShowHelp();
                return(-1);
            }
            else if (p.Help)
            {
                p.ShowHelp();
                return(-1);
            }

#if SUBRING
            SubringSimulator sim = new SubringSimulator(p);
#else
            Simulator sim = new Simulator(p);
#endif

            if (p.Complete)
            {
                sim.Complete(false);
            }
            else if (p.Broadcast > -2)
            {
                Broadcast(sim, p.Broadcast, p.Output);
            }
            else if (p.HeavyChurn > 0)
            {
                HeavyChurn(sim, p.HeavyChurn);
            }
            else if (p.Evaluation)
            {
                Evaluate(sim, p);
            }
            else
            {
                Commands(sim);
            }
            return(0);
        }
Ejemplo n.º 5
0
        public static int Main(string [] args)
        {
            Parameters p = new Parameters("Simulator", "Simulator - Brunet Time Based Simulator");

            if (p.Parse(args) != 0)
            {
                Console.WriteLine(p.ErrorMessage);
                p.ShowHelp();
                return(-1);
            }
            else if (p.Help)
            {
                p.ShowHelp();
                return(-1);
            }

            Simulator sim = new Simulator(p);

            if (p.Complete)
            {
                sim.Complete();
            }
            else if (p.Evaluation)
            {
                DateTime now = DateTime.UtcNow;
                sim.Complete();
                SimpleTimer.RunSteps(p.EvaluationTime, false);
                sim.Complete();
                Console.WriteLine("Time spent setting up: " + (DateTime.UtcNow - now).ToString());
                sim.AllToAll();
                sim.Crawl();
            }
            else if (p.HeavyChurn)
            {
                HeavyChurn(sim, p.EvaluationTime);
            }
            else
            {
                Commands(sim);
            }
            return(0);
        }
Ejemplo n.º 6
0
    public static int Main(string []args)
    {
      Parameters p = new Parameters("RelayOverlapSimulator", "Brunet Time Based Simulator for Relays");
      if(p.Parse(args) != 0) {
        Console.WriteLine(p.ErrorMessage);
        p.ShowHelp();
        return -1;
      } else if(p.Help) {
        p.ShowHelp();
        return -1;
      }

      RelayOverlapSimulator sim = new RelayOverlapSimulator(p);
      sim.Complete(false);
      if(p.Evaluation) {
        Evaluator(sim);
      } else {
        Simulator(sim);
      }

      return 0;
    }