当前位置: 首页>>代码示例>>Java>>正文


Java Clock.defaultClock方法代码示例

本文整理汇总了Java中com.codahale.metrics.Clock.defaultClock方法的典型用法代码示例。如果您正苦于以下问题:Java Clock.defaultClock方法的具体用法?Java Clock.defaultClock怎么用?Java Clock.defaultClock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.codahale.metrics.Clock的用法示例。


在下文中一共展示了Clock.defaultClock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ElasticsearchReporter

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private ElasticsearchReporter(MetricRegistry registry, MetricFilter filter, TimeUnit rateUnit,
		TimeUnit durationUnit, String host, String port, String indexName, String timestampField) {

	super(registry, "elasticsearch-reporter", filter, rateUnit, durationUnit);

	this.clock = Clock.defaultClock();
	this.connector = new ElasticsearchConnector(host, port, indexName);
	this.timestampField = timestampField;
	this.timestampFormat = new SimpleDateFormat(timeStampString);
	this.localhost = Utils.localHostName();

	jsonFactory = new JsonFactory();

	indexInitialized = connector.addDefaultMappings();
	if (!indexInitialized) {
		LOGGER.warn("Failed to initialize Elasticsearch index '" + indexName + "' on " + host + ":" + port);
	}
}
 
开发者ID:ibmruntimes,项目名称:spelk,代码行数:19,代码来源:ElasticsearchReporter.java

示例2: HawkularReporter

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
HawkularReporter(MetricRegistry registry,
                 HawkularHttpClient hawkularClient,
                 Optional<String> prefix,
                 MetricsDecomposer decomposer,
                 MetricsTagger tagger,
                 TimeUnit rateUnit,
                 TimeUnit durationUnit,
                 MetricFilter filter) {
    super(registry, "hawkular-reporter", filter, rateUnit, durationUnit);

    this.prefix = prefix;
    this.clock = Clock.defaultClock();
    this.hawkularClient = hawkularClient;
    this.decomposer = decomposer;
    this.tagger = tagger;
}
 
开发者ID:hawkular,项目名称:hawkular-dropwizard-reporter,代码行数:17,代码来源:HawkularReporter.java

示例3: configureExternalHttpsConnector

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private AbstractConnector configureExternalHttpsConnector() {
    logger.info("Creating https connector");

    final SslContextFactory sslContextFactory = new SslContextFactory();
    sslContextFactory.setCertAlias(getConfiguration().getSslConfiguration().getKeyStoreAlias());
    sslContextFactory.setKeyStorePath(getConfiguration().getSslConfiguration().getKeyStorePath());
    sslContextFactory.setKeyStorePassword(getConfiguration().getSslConfiguration().getKeyStorePassword());

    final Integer port = getConfiguration().getSslConfiguration().getPort() != null ?
            getConfiguration().getSslConfiguration().getPort() :
            getConfiguration().getPort();

    final InstrumentedSslSocketConnector connector = new InstrumentedSslSocketConnector(
            this.metricRegistry,
            port,
            sslContextFactory,
            Clock.defaultClock());
    connector.setName(EXTERNAL_HTTPS_CONNECTOR_NAME);

    return connector;
}
 
开发者ID:wotifgroup,项目名称:grails-lightweight-deploy,代码行数:22,代码来源:ExternalConnectorFactory.java

示例4: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.clock = Clock.defaultClock();
    this.prefix = null;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:oneops,项目名称:oneops,代码行数:9,代码来源:ElasticsearchReporter.java

示例5: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.locale = Locale.getDefault();
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.clock = Clock.defaultClock();
    this.filter = MetricFilter.ALL;
}
 
开发者ID:epam,项目名称:Lagerta,代码行数:9,代码来源:HumanReadableCsvReporter.java

示例6: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(final MetricRegistry metricRegistry, final AmazonCloudWatchAsync cloudWatchAsyncClient, final String namespace) {
    this.metricRegistry = metricRegistry;
    this.cloudWatchAsyncClient = cloudWatchAsyncClient;
    this.namespace = namespace;
    this.percentiles = new Percentile[]{Percentile.P75, Percentile.P95, Percentile.P999};
    this.metricFilter = MetricFilter.ALL;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.globalDimensions = new LinkedHashSet<>();
    this.cwRateUnit = toStandardUnit(rateUnit);
    this.cwDurationUnit = toStandardUnit(durationUnit);
    this.clock = Clock.defaultClock();
}
 
开发者ID:azagniotov,项目名称:codahale-aggregated-metrics-cloudwatch-reporter,代码行数:14,代码来源:CloudWatchReporter.java

示例7: CompositeForwardingTimer

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
public CompositeForwardingTimer(Timer mainDelegate, MetricProvider<Timer> supplementaryMetricProvider) {
    Preconditions.checkNotNull(mainDelegate);
    Preconditions.checkNotNull(supplementaryMetricProvider);

    this.mainDelegate = mainDelegate;
    this.supplementaryMetricProvider = supplementaryMetricProvider;
    this.clock = Clock.defaultClock();
}
 
开发者ID:centro,项目名称:monitoring-center,代码行数:9,代码来源:CompositeForwardingTimer.java

示例8: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
public Builder(MetricRegistry registry) {
  this.registry = registry;
  this.expansions = Expansion.ALL;
  this.clock = Clock.defaultClock();
  this.rateUnit = TimeUnit.SECONDS;
  this.durationUnit = TimeUnit.MILLISECONDS;
  this.filter = MetricFilter.ALL;
  this.metricNameFormatter = new DefaultMetricNameFormatter();
  this.tags = new ArrayList<String>();
  this.suppress_bad_analytics = true;
}
 
开发者ID:circonus-labs,项目名称:metrics-circonus,代码行数:12,代码来源:CirconusReporter.java

示例9: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
protected Builder(MetricRegistry registry) {
  this.registry = registry;
  this.output = System.out;
  this.locale = Locale.getDefault();
  this.clock = Clock.defaultClock();
  this.timeZone = TimeZone.getDefault();
  this.rateUnit = TimeUnit.SECONDS;
  this.durationUnit = TimeUnit.MILLISECONDS;
  this.filter = MetricFilter.ALL;
  this.tags = new LinkedHashMap<String, String>();
}
 
开发者ID:Hanmourang,项目名称:Gobblin,代码行数:12,代码来源:OutputStreamReporter.java

示例10: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.output = System.out;
    this.locale = Locale.getDefault();
    this.clock = Clock.defaultClock();
    this.timeZone = TimeZone.getDefault();
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.filter = MetricFilter.ALL;
}
 
开发者ID:aol,项目名称:micro-server,代码行数:11,代码来源:TestReporter.java

示例11: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.clock = Clock.defaultClock();
    this.filter = MetricFilter.ALL;
}
 
开发者ID:wso2,项目名称:carbon-metrics,代码行数:8,代码来源:DasReporter.java

示例12: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS;
    this.clock = Clock.defaultClock();
    this.filter = MetricFilter.ALL;
    this.timestampUnit = TimeUnit.SECONDS;
}
 
开发者ID:wso2,项目名称:carbon-metrics,代码行数:9,代码来源:JdbcReporter.java

示例13: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
    this.registry = registry;
    this.clock = Clock.defaultClock();
    this.filter = MetricFilter.ALL;
    this.rateUnit = TimeUnit.SECONDS;
    this.durationUnit = TimeUnit.MILLISECONDS; 
}
 
开发者ID:ezbake,项目名称:ezbake-common-java,代码行数:8,代码来源:MetricsReporter.java

示例14: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
private Builder(MetricRegistry registry) {
	this.registry = registry;
	this.clock = Clock.defaultClock();
	this.prefix = null;
	this.rateUnit = TimeUnit.SECONDS;
	this.durationUnit = TimeUnit.MILLISECONDS;
	this.filter = MetricFilter.ALL;
}
 
开发者ID:egineering-llc,项目名称:metrics-instrumental,代码行数:9,代码来源:InstrumentalReporter.java

示例15: Builder

import com.codahale.metrics.Clock; //导入方法依赖的package包/类
protected Builder() {
  this.name = "OutputStreamReporter";
  this.output = System.out;
  this.locale = Locale.getDefault();
  this.clock = Clock.defaultClock();
  this.timeZone = TimeZone.getDefault();
}
 
开发者ID:apache,项目名称:incubator-gobblin,代码行数:8,代码来源:OutputStreamReporter.java


注:本文中的com.codahale.metrics.Clock.defaultClock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。