當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。