635 Star 2.6K Fork 782

柠檬夕桐 / sequence

 / 详情

systemclock有效吗?

Backlog
Opened this issue  
2020-09-16 15:22

假如systemclock的线程一直得不到资源,是否导致sequence的“获取下一秒”方法死循环,在高并发情况下得不偿失?
简单跑了一下性能测试:
/**
* 吞吐量4838091/s
/
@test
@JunitPerfConfig(warmUp = 100,threads = 50,duration = 15
1000)
public void testSystemtime() {
System.currentTimeMillis();
}
/**
* 吞吐量4612397/s
/
@test
@JunitPerfConfig(warmUp = 100,threads = 50,duration = 15
1000)
public void testSystemclockMultiThread() {
SystemClock.now();
}

Comments (0)

SeasonGen created任务
SeasonGen set related repository to 沐浴夕桐/sequence
Expand operation logs

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
1139538 seasongen 1638624693
Java
1
https://git.oschina.net/yu120/sequence.git
git@git.oschina.net:yu120/sequence.git
yu120
sequence
sequence

Search