This plugin is active iff any run has at least one histograms tag.
519445
def is_active(self):
    """"""
    if self._db_connection_provider:
      # The plugin is active if one relevant tag can be found in the database.
      db = self._db_connection_provider()
      cursor = db.execute('''
        SELECT
          1
        FROM Tags
        WHERE Tags.plugin_name = ?
        LIMIT 1
      ''', (metadata.PLUGIN_NAME,))
      return bool(list(cursor))

    return bool(self._multiplexer) and any(self.index_impl().values())
1373447
def is_active(ext, metadata):
    """"""
    if metadata.get('run_control', {}).get('frozen') is True:
        return False
    if 'active' not in metadata:
        return True
    return ext.replace('.', '') in re.split('\\.|,', metadata['active'])
101150
def plugin_info_by_tag(tag, opts={})
      matches = Fluent::Engine.root_agent.event_router.instance_variable_get(:@match_rules)
      matches.each { |rule|
        if rule.match?(tag)
          if rule.collector.is_a?(Fluent::Plugin::Output) || rule.collector.is_a?(Fluent::Output)
            return get_monitor_info(rule.collector, opts)
          end
        end
      }
      nil
    end
1372087
void refresh() {
		if (isCompleted()) {
			return;
		}

		if (hProcess.getCompleted().contains(plugin)) {
			status = STATUS_COMPLETED;
		} else if (hProcess.getRunning().contains(plugin)) {
			status = STATUS_RUNNING;
		}
	}
654254
def check_failhard(self, low, running):
        '''
        
        '''
        tag = _gen_tag(low)
        if self.opts.get('test', False):
            return False
        if low.get('failhard', self.opts['failhard']) and tag in running:
            if running[tag]['result'] is None:
                return False
            return not running[tag]['result']
        return False
141775
public function showLatencyStats(bool $histograms = false) : self
    {
        $this->latencyStats = $histograms ? self::LATENCY_STATS_HISTOGRAMS : self::LATENCY_STATS_SIMPLE;

        return $this;
    }
397382
def li_page_active_if(condition, attributes = {}, &block)
      if condition
        attributes[:class] ||= ''
        attributes[:class] += " active"
      end
      content_tag("li", attributes, &block)
    end
676265
function plugin(hydro, utils, root){
  var stats = track(hydro)
  var stat = domify(statsTemplate)
  var items = stat.getElementsByTagName('li')
  var passes = items[1].getElementsByTagName('em')[0]
  var passesLink = items[1].getElementsByTagName('a')[0]
  var failures = items[2].getElementsByTagName('em')[0]
  var failuresLink = items[2].getElementsByTagName('a')[0]
  var duration = items[3].getElementsByTagName('em')[0]
  var progress = new Progress().size(40).text('%d%')
  var report = domify('<ul id=hydro-report></ul>')
  var stack = [report]

  root = root
    || document.getElementById('hydro')
    || document.body.appendChild(domify('<div id=hydro></div>'))

  items[0].appendChild(progress.el)
  root.appendChild(stat)
  root.appendChild(report)

  // pass toggle
  bind(passesLink, 'click', function(){
    unhide()
    classes.remove('fail', report)
    classes.toggle('pass', report)
    classes.has('pass', report) && hideSuitesWithout('test pass')
  })

  // failure toggle
  bind(failuresLink, 'click', function(){
    unhide()
    classes.remove('pass', report)
    classes.toggle('fail', report)
    classes.has('fail', report) && hideSuitesWithout('test fail')
  })

  hydro.on('pre:suite', function(suite){
    var el = fragment(
      '<li class="suite"><h1><a href="%s">%e</a></h1></li>',
      grep(suite),
      suite.title)

    stack[0].appendChild(el)
    stack.unshift(document.createElement('ul'))
    el.appendChild(stack[0])
  })

  hydro.on('post:suite', function(){
    stack.shift()
  })

  hydro.on('post:test', function(test){
    progress.update(stats.percent)

    // update stats
    text(passes, stats.passes)
    text(failures, stats.failures)
    text(duration, (stats.elapsed / 1000).toFixed(2))

    // test
    switch (test.status) {
      case 'passed':
        var el = fragment(
          '<li class="test pass %s"><h2>%e<span class=duration>%sms</span></h2></li>',
          test.speed || 'fast',
          test.title,
          test.time)
        break
      case 'pending':
      case 'skipped':
        var el = fragment(
          '<li class="test pass pending"><h2>%e</h2></li>',
          test.title)
        break
      case 'failed':
        var str = test.error.stack || test.error.toString()

        // FF / Opera do not add the message
        if (!~str.indexOf(test.error.message)) {
          str = test.error.message + '\n' + str
        }

        // Safari doesn't give you a stack. Let's at least provide a source line.
        if (!test.error.stack && test.error.sourceURL && test.error.line !== undefined) {
          str += "\n(" + test.error.sourceURL + ":" + test.error.line + ")"
        }

        var el = fragment(
          '<li class="test fail"><h2>%e</h2><pre class=error>%e</pre></li>',
          test.title,
          str)
    }

    // hide code
    if (test.status != 'pending') {
      var h2 = el.getElementsByTagName('h2')[0]
      var pre = fragment('<pre><code>%s</code></pre>', highlight(trim(clean(test.fn))))
      el.appendChild(pre)
      pre.style.display = 'none'

      bind(h2, 'dblclick', function(){
        location.search = grep(test)
      })

      bind(h2, 'click', function(){
        pre.style.display = 'none' == pre.style.display
          ? 'block'
          : 'none'
      })
    }

    stack[0].appendChild(el)
  })

  // grep tests
  var query = location.search.replace(/^\?/, '')
  var focus = qs.parse(query).focus
  if (focus) hydro.on('pre:test', function(test) {
    if (test.fullTitle().indexOf(focus) < 0) test.skip()
  })
}
616065
def histogram(module, name, value):
    
    histogram = get_metric('histograms', module, name, Histogram())
    histogram.update(value)
1262836
public void checkTags(Doc doc, Tag[] tags, boolean areInlineTags) {
        if (tags == null) {
            return;
        }
        Taglet taglet;
        for (Tag tag : tags) {
            String name = tag.name();
            if (name.length() > 0 && name.charAt(0) == '@') {
                name = name.substring(1, name.length());
            }
            if (! (standardTags.contains(name) || customTags.containsKey(name))) {
                if (standardTagsLowercase.contains(StringUtils.toLowerCase(name))) {
                    message.warning(tag.position(), "doclet.UnknownTagLowercase", tag.name());
                    continue;
                } else {
                    message.warning(tag.position(), "doclet.UnknownTag", tag.name());
                    continue;
                }
            }
            //Check if this tag is being used in the wrong location.
            if ((taglet = customTags.get(name)) != null) {
                if (areInlineTags && ! taglet.isInlineTag()) {
                    printTagMisuseWarn(taglet, tag, "inline");
                }
                if ((doc instanceof RootDoc) && ! taglet.inOverview()) {
                    printTagMisuseWarn(taglet, tag, "overview");
                } else if ((doc instanceof PackageDoc) && ! taglet.inPackage()) {
                    printTagMisuseWarn(taglet, tag, "package");
                } else if ((doc instanceof ClassDoc) && ! taglet.inType()) {
                    printTagMisuseWarn(taglet, tag, "class");
                } else if ((doc instanceof ConstructorDoc) && ! taglet.inConstructor()) {
                    printTagMisuseWarn(taglet, tag, "constructor");
                } else if ((doc instanceof FieldDoc) && ! taglet.inField()) {
                    printTagMisuseWarn(taglet, tag, "field");
                } else if ((doc instanceof MethodDoc) && ! taglet.inMethod()) {
                    printTagMisuseWarn(taglet, tag, "method");
                }
            }
        }
    }
253729
def is_active(self):
    
    return bool(
        self._grpc_port is not None and
        self._event_multiplexer and
        self._event_multiplexer.PluginRunToTagToContent(
            constants.DEBUGGER_PLUGIN_NAME))
1374080
def runWizard( self ):
        
        plugin = self.currentPlugin()
        if ( plugin and plugin.runWizard(self) ):
            self.accept()
976282
def _runable_for_event(f, tag, stage):
    

    if not hasattr(f, '__ambry_event__'):
        return False

    f_tag, f_stage = f.__ambry_event__

    if stage is None:
        stage = 0

    if tag != f_tag or stage != f_stage:
        return False

    return True
11815
def is_active(self):
    
    if not self._multiplexer:
      return False

    if self._index_cached is not None:
      # If we already have computed the index, use it to determine whether
      # the plugin should be active, and if so, return immediately.
      if any(self._index_cached.values()):
        return True

    if self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME):
      # Text data is present in the multiplexer. No need to further check for
      # data stored via the outdated plugin assets method.
      return True

    # We haven't conclusively determined if the plugin should be active. Launch
    # a thread to compute index_impl() and return False to avoid blocking.
    self._maybe_launch_index_impl_thread()

    return False
273574
private function is_premium_plugin_active( $plugin_id = false ) {
            if ( $plugin_id != $this->_fs->get_id() ) {
                return $this->_fs->is_addon_activated( $plugin_id, true );
            }

            return is_plugin_active( $this->_fs->premium_plugin_basename() );
        }
97066
def is_active(self):
    """"""
    if self._db_connection_provider:
      # The plugin is active if one relevant tag can be found in the database.
      db = self._db_connection_provider()
      cursor = db.execute(
          '''
          SELECT 1
          FROM Tags
          WHERE Tags.plugin_name = ?
          LIMIT 1
          ''',
          (metadata.PLUGIN_NAME,))
      return bool(list(cursor))
    if not self._multiplexer:
      return False
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
1323012
def is_active(self):
    
    if not self._multiplexer:
      return False

    scalars_plugin_instance = self._get_scalars_plugin()
    if not (scalars_plugin_instance and
            scalars_plugin_instance.is_active()):
      return False

    # This plugin is active if any run has a layout.
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))