Sets up this benchmark.
336149
@Setup
    public void setup() {
        baseClassDescription = TypePool.Default.ofSystemLoader().describe(baseClass.getName()).resolve();
    }
1220988
function Benchmarked(options) {
  if (!(this instanceof Benchmarked)) {
    return new Benchmarked(options);
  }
  Emitter.call(this);
  this.options = Object.assign({}, options);
  this.results = [];
  this.defaults(this);
}
14055
function initializePerformance(req, _resp, next) {
    req.amorphicTracking = {
        startTime: process.hrtime(),
        serverTasks: [],
        browserTasks: [],
        loggingContext: {},
        addServerTask: function addTask(props, hrStartTime) {
            let diff = process.hrtime(hrStartTime);
            let took = (diff[0] * 1e9 + diff[1]) / 1000000;
            props.time = took;
            this.serverTasks.push(props);
        }
    };

    next();
}
557844
protected function setUp(): void
    {
        parent::setUp();

        if ($this->hasReturnType()) {
            $this->getFile()->recordMetric($this->stackPos, 'Has return type', 'yes');
        }
    }
1262955
public function setup(){
		if(($this->hasOption('autoinit') && $this->options()->autoinit) && ($this->hasOption('class') || $this->hasOption('default'))){
			$strClass = $this->hasOption('class') ? $this->options()->class : $this->options()->default;
			$this->setValue(new $strClass);
		}
	}
920338
public synchronized void setUp()
	{	
			if(initialized)
				return;

			String className = null;
			
			//Load
			Map<Object,Object> properties = settings.getProperties();
			
			String key = null;
			
			Object serviceObject = null;
			
			for(Map.Entry<Object,Object> entry : properties.entrySet())
			{
				key = String.valueOf(entry.getKey());
				
				if(key.startsWith(PROP_PREFIX))
				{
					try
					{
						className = (String)entry.getValue();
						serviceObject = ClassPath.newInstance(className);
						
						factoryMap.put(key, serviceObject);
					}
					catch (Throwable e)
					{
						throw new SetupException("CLASS:"+className+" ERROR:"+e.getMessage(),e);
					}
				}
			}
			
			initialized = true;
		}
1108230
def _setup(self):
        
        _ensureDir(self.nonce_dir)
        _ensureDir(self.association_dir)
        _ensureDir(self.temp_dir)
193357
def setup(self, interval):
        """"""
        self.trace_counter = 0

        self._halt = False
        self.interval = interval
1108971
public function setup(): void
    {
        $this->rtl = I18N::direction() === 'rtl';

        $this->rkeywords = '';

        // I18N: This is a report footer. %s is the name of the application.
        $this->generated_by = I18N::translate('Generated by %s', Webtrees::NAME . ' ' . Webtrees::VERSION);

        // Paper size - defaults to A4 if the report fails to define a size.
        [$this->page_width, $this->page_height] = self::PAPER_SIZES[$this->page_format] ?? self::PAPER_SIZES['A4'];
    }
953438
public static Benchmark setUpBenchmark(final String[] classes, final Benchmark benchmark) throws ClassNotFoundException {
        for (final String each : classes) {
            benchmark.add(Class.forName(each));
        }
        return benchmark;
    }
926493
def setStimReps(self):
        """"""
        reps = self.ui.nrepsSpnbx.value()
        self.stimModel.setRepCount(reps)
261863
def run(self):
        """"""
        (task_id, tasks) = self.server.get_task()
        self.task_store.from_dict(tasks)
        for (index, task) in self.task_store:
            result = self.compute(index, task)
            self.results.append(result)
        self.server.task_done((task_id, self.results))
929182
@Setup(Level.Trial)
  public void setup() throws Exception {
    super.setup(ExecutorType.DIRECT,
        ExecutorType.DIRECT,
        MessageSize.SMALL,
        responseSize,
        clientInboundFlowWindow,
        ChannelType.NIO,
        maxConcurrentStreams,
        1);
    callCounter = new AtomicLong();
    completed = new AtomicBoolean();
    record = new AtomicBoolean();
    latch = startFlowControlledStreamingCalls(maxConcurrentStreams, callCounter, record, completed,
        responseSize.bytes());
  }
885312
def run(self, **kwargs):
        '''
        
        '''
        self.report_start()
        for bench in self.benchmarks:
            bench = bench(before=self.report_before_method,
                      after=self.report_after_method,
                      after_each=self.report_progress,
                      debug=self.debug,
                      **kwargs)
            self.report_before_class(bench)
            bench.run()
            self.report_after_class(bench)
            self.runned.append(bench)
        self.report_end()
396002
void setup() {
    // Cannot set wait for confirmed kill mode if cannot check if task is alive
    if (supportsIsTaskAlive()) {
      waitForConfirmedKill = getConf().getBoolean(WAIT_FOR_CONFIRMED_KILL_KEY,
          WAIT_FOR_CONFIRMED_DEFAULT);
      confirmedKillRetries = getConf().getInt(CONFIRMED_KILL_RETRIES_KEY,
          CONFIRMED_KILL_RETRIES_DEFAULT);
    }
    LOG.info("setup: waitForConfirmedKill=" + waitForConfirmedKill +
        ", confirmedKillRetries=" + confirmedKillRetries);
  }
1270190
protected function setup() {
		$conf = $this->conf;

		$dbh = $this->dbh = \mysqli_init();

		foreach ($this->conf['options'] as $key => $setting) {
			if ($setting != null && is_array($setting)) {
				mysqli_options($dbh, $setting['key'], $setting['value']);
			}
		}

		$this->preconnectConf($dbh);

		$this->establishConnection($dbh, $conf);

		$this->postconnectConf($dbh);

		/* check connection */
		if (mysqli_connect_errno()) {
			throw new Panic("Connect failed: " . \mysqli_connect_error());
		}

		\mysqli_set_charset($dbh, $conf['charset']);

		$offset = \hlin\Time::timezoneOffset($conf['timezone']);
		\mysqli_real_query($dbh, "SET time_zone='$offset';");
	}
1251200
def run(self):
        """"""
        while not self._finished.isSet():
            self._func(self._reference)
            self._finished.wait(self._func._interval / 1000.0)