public synchronized void  execute() throws Exception {if (executed) {throw new IllegalStateException("Benchmark was already executed");}executed = true;runData.setStartTimeMillis();algorithm.execute();}
public virtual void Execute(){lock (this){if (executed){throw new InvalidOperationException("Benchmark was already executed");}executed = true;runData.SetStartTimeMillis();algorithm.Execute();}}