Ejemplo n.º 1
0
 public void showBenchMark()
 {
     purgeAll();
     bench = new BenchMark();
     stage.AddChild( bench );
     if ( stats != null ) stage.AddChild( stats );
 }
Ejemplo n.º 2
0
                    public int run()
                    {
                        BenchMark self = this; this.microSeconds = 0; for (int i = 0; i < iterations; i++)

                        {
                            self.runOneIteration();
                        }
                        return(this.microSeconds);
                    }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var Arr = SortHelp.ArrayGenerate(3000, 1, 10000);

            String[] methodList = { "select", "bubble", "insert", "shell" };
            foreach (String name in methodList)
            {
                BenchMark <int> benchMark = new BenchMark <int>(name);
                benchMark.OneBench(100, Arr);
                benchMark.showData();
            }
        }
Ejemplo n.º 4
0
    private void purgeAll()
    {
        if ( menu != null ) {
            stage.RemoveChild( menu );
            menu = null;
        }

        if ( bunny != null ) {
            stage.RemoveChild( bunny );
            bunny = null;
        }

        if ( bench != null ) {
            stage.RemoveChild( bench );
            bench = null;
        }

        if ( pirate != null ) {
            stage.RemoveChild( pirate );
            pirate = null;
        }
    }