code: public function profileEnd($name = null)
      {
          $args = \func_get_args();
          $meta = $this->internal->getMetaVals(
              $args,
              array('channel' => $this->cfg['channel']),
              array('name' => null),
              array('name')
          );
          if ($meta['name'] === null) {
              \end($this->data['profileInstances']);
              $meta['name'] = \key($this->data['profileInstances']);
          }
          $name = $meta['name'];
          if (isset($this->data['profileInstances'][$name])) {
              $instance = $this->data['profileInstances'][$name];
              $data = $instance->end();
              $caption = 'Profile \''.$name.'\' Results';
              if ($data) {
                  $args = array( $data );
                  $meta['sortable'] = true;
                  $meta['caption'] = $caption;
                  $meta['totalCols'] = array('ownTime');
                  $meta['columns'] = array();
              } else {
                  $args = array($caption, 'no data');
              }
              unset($this->data['profileInstances'][$name]);
          } else {
              $args = array( $name !== null
                  ? 'profileEnd: No such Profile: '.$name
                  : 'profileEnd: Not currently profiling'
              );
          }
          $this->appendLog(
              __FUNCTION__,
              $args,
              $meta
          );
      }
docs: Stops recording profile info & adds info to the log
  
  * if name is passed and it matches the name of a profile being recorded, then that profile is stopped.
  * if name is passed and it does not match the name of a profile being recorded, nothing will be done
  * if name is not passed, the most recently started profile is stopped (named, or non-named).
  
  @param string $name Optional Profile name
  
  @return void