auto commit
This commit is contained in:
4
Java/source/.gitignore
vendored
4
Java/source/.gitignore
vendored
@@ -19,7 +19,9 @@
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
target/
|
||||
target
|
||||
.vscode
|
||||
*.code-workspace
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<java.version>11</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -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