auto commit
This commit is contained in:
@@ -12,7 +12,7 @@ public class StartUp {
|
||||
* [不同CPU可能结果有差异,但相对大小不变]
|
||||
* 默认配置下,最佳性能是5W/s-8W/s
|
||||
*/
|
||||
final static int genIdCount = 50000;
|
||||
final static int genIdCount = 500000;
|
||||
|
||||
//1-漂移算法,2-传统算法
|
||||
final static short method = 1;
|
||||
@@ -20,11 +20,12 @@ public class StartUp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
IdGeneratorOptions options = new IdGeneratorOptions();
|
||||
// options.WorkerIdBitLength = 6;
|
||||
// options.SeqBitLength = 6;
|
||||
// options.WorkerIdBitLength = 6; // 默认6
|
||||
options.SeqBitLength = 10; // 默认6
|
||||
// options.BaseTime = 1582206693000L;
|
||||
options.Method = method;
|
||||
options.WorkerId = 1;
|
||||
options.TopOverCostCount=2000;
|
||||
|
||||
// 首先测试一下 IdHelper 方法,获取单个Id
|
||||
YitIdHelper.setIdGenerator(options);
|
||||
|
||||
Reference in New Issue
Block a user