1
0
mirror of synced 2025-12-26 23:17:58 +08:00

auto commit

This commit is contained in:
yitter
2022-07-15 16:24:30 +08:00
parent 34cff2eab8
commit cce7a65384
6 changed files with 88 additions and 43 deletions

View File

@@ -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);