We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
线上使用fastcompass 统计cache命中率时出现很多统计错误,相应的测试代码如下: public void execute() { long startTime = System.currentTimeMillis(); boolean isSuccess = false; try { TimeUnit.MICROSECONDS.sleep(1000); //do business staff...... //isSuccess = true; } catch (Exception e) { //....... } finally { long endTime = System.currentTimeMillis(); //模拟成功率 isSuccess = startTime % 10 == 0 ? false : true; metric.record(endTime - startTime, isSuccess); } } 这里用的是模拟数据,成功率应在90%。 在单线程下,这段代码输出正确。 在多线程下,线程池数量为100时,抓到的很多数据bucket_count,success_bucket_count,fail_bucket_count,success_rate都为0.0
The text was updated successfully, but these errors were encountered:
麻烦提供一下完整的测试用例?
Sorry, something went wrong.
代码行数比较多,整理后上传到这里了,https://github.com/bjo2008cnx/metrics-examples.git
麻烦大牛看下,是不是我使用的姿势不对。
No branches or pull requests
线上使用fastcompass 统计cache命中率时出现很多统计错误,相应的测试代码如下:
public void execute() {
long startTime = System.currentTimeMillis();
boolean isSuccess = false;
try {
TimeUnit.MICROSECONDS.sleep(1000);
//do business staff......
//isSuccess = true;
} catch (Exception e) {
//.......
} finally {
long endTime = System.currentTimeMillis();
//模拟成功率
isSuccess = startTime % 10 == 0 ? false : true;
metric.record(endTime - startTime, isSuccess);
}
}
这里用的是模拟数据,成功率应在90%。
在单线程下,这段代码输出正确。
在多线程下,线程池数量为100时,抓到的很多数据bucket_count,success_bucket_count,fail_bucket_count,success_rate都为0.0
The text was updated successfully, but these errors were encountered: