Пример #1
0
 public void Run(Arguments args)
 {
     valid = true;
     console.Clear();
     console.Info(this.GetType().Name + " Begin");
     RunExample(args);
     console.Info(this.GetType().Name + " End");
 }
Пример #2
0
        private void InitRecords()
        {
            while (example.valid)
            {
                int key = Interlocked.Increment(ref shared.currentKey);

                if (key >= args.recordsInit)
                {
                    if (key == args.recordsInit)
                    {
                        console.Info("write(tps={0} timeouts={1} errors={2} total={3}))",
                                     shared.writeCount, shared.writeTimeoutCount, shared.writeErrorCount, args.recordsInit
                                     );
                    }
                    break;
                }
                Write(key);
            }
        }