getName() 공개 메소드

Return the method name of this subject.
public getName ( ) : string
리턴 string
예제 #1
0
 public function createSubjectFromMetadata(SubjectMetadata $metadata)
 {
     $subject = new Subject($this, $metadata->getName());
     $subject->setGroups($metadata->getGroups());
     $subject->setSleep($metadata->getSleep());
     $subject->setRetryThreshold($metadata->getRetryThreshold());
     $subject->setOutputTimeUnit($metadata->getOutputTimeUnit());
     $subject->setOutputTimePrecision($metadata->getOutputTimePrecision());
     $subject->setOutputMode($metadata->getOutputMode());
     $this->subjects[] = $subject;
     return $subject;
 }
예제 #2
0
 private function buildSubject(SubjectMetadata $subject, $annotations)
 {
     foreach ($annotations as $annotation) {
         if ($annotation instanceof BeforeClassMethods) {
             throw new \InvalidArgumentException(sprintf('@BeforeClassMethods annotation can only be applied at the class level (%s)', $subject->getBenchmark()->getClass() . '::' . $subject->getName()));
         }
         if ($annotation instanceof AfterClassMethods) {
             throw new \InvalidArgumentException(sprintf('@AfterClassMethods annotation can only be applied at the class level (%s)', $subject->getBenchmark()->getClass() . '::' . $subject->getName()));
         }
         $this->processSubject($subject, $annotation);
     }
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function execute(SubjectMetadata $subjectMetadata, Iteration $iteration, Config $config)
 {
     $tokens = ['class' => $subjectMetadata->getBenchmark()->getClass(), 'file' => $subjectMetadata->getBenchmark()->getPath(), 'subject' => $subjectMetadata->getName(), 'revolutions' => $iteration->getVariant()->getRevolutions(), 'beforeMethods' => var_export($subjectMetadata->getBeforeMethods(), true), 'afterMethods' => var_export($subjectMetadata->getAfterMethods(), true), 'parameters' => var_export($iteration->getVariant()->getParameterSet()->getArrayCopy(), true), 'warmup' => $iteration->getVariant()->getWarmup() ?: 0];
     $payload = $this->launcher->payload(__DIR__ . '/template/microtime.template', $tokens);
     return $this->launch($payload, $iteration, $config);
 }