本文整理了Java中com.netflix.servo.monitor.Stopwatch.start()
方法的一些代码示例,展示了Stopwatch.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stopwatch.start()
方法的具体详情如下:
包路径:com.netflix.servo.monitor.Stopwatch
类名称:Stopwatch
方法名:start
[英]Mark the start time.
[中]标记开始时间。
代码示例来源:origin: Netflix/conductor
private static Stopwatch start(Timer sm) {
Stopwatch sw = new BasicStopwatch() {
@Override
public void stop() {
super.stop();
long duration = getDuration(TimeUnit.MILLISECONDS);
sm.record(duration, TimeUnit.MILLISECONDS);
}
};
sw.start();
return sw;
}
代码示例来源:origin: Netflix/servo
/**
* Returns a stopwatch that has been started and will automatically
* record its result to this timer when stopped. Every time this method is called
* the number of active tasks for the timer will be incremented.
* The number will be decremented when the stopwatch is stopped.
*/
public Stopwatch start() {
Stopwatch s = new DurationStopwatch();
s.start();
return s;
}
代码示例来源:origin: Netflix/servo
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: Netflix/servo
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: Netflix/servo
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: Netflix/servo
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(getMonitorForCurrentContext());
s.start();
return s;
}
代码示例来源:origin: com.netflix.conductor/conductor-core
private static Stopwatch start(Timer sm) {
Stopwatch sw = new BasicStopwatch() {
@Override
public void stop() {
super.stop();
long duration = getDuration(TimeUnit.MILLISECONDS);
sm.record(duration, TimeUnit.MILLISECONDS);
}
};
sw.start();
return sw;
}
代码示例来源:origin: Netflix/dyno-queues
public Stopwatch start(StatsMonitor sm, int batchCount) {
int count = (batchCount == 0) ? 1 : batchCount;
Stopwatch sw = new BasicStopwatch() {
@Override
public void stop() {
super.stop();
long duration = getDuration(TimeUnit.MILLISECONDS) / count;
sm.record(duration);
batchSize.record(count);
}
};
sw.start();
return sw;
}
代码示例来源:origin: com.netflix.servo/servo-core
/**
* Returns a stopwatch that has been started and will automatically
* record its result to this timer when stopped. Every time this method is called
* the number of active tasks for the timer will be incremented.
* The number will be decremented when the stopwatch is stopped.
*/
public Stopwatch start() {
Stopwatch s = new DurationStopwatch();
s.start();
return s;
}
代码示例来源:origin: com.netflix.servo/servo-core
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: com.netflix.servo/servo-core
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: com.netflix.servo/servo-core
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(this);
s.start();
return s;
}
代码示例来源:origin: com.netflix.servo/servo-core
/**
* {@inheritDoc}
*/
@Override
public Stopwatch start() {
Stopwatch s = new TimedStopwatch(getMonitorForCurrentContext());
s.start();
return s;
}
内容来源于网络,如有侵权,请联系作者删除!