From 55a5722d959b601f5882467b0e48ccae0e3b8e38 Mon Sep 17 00:00:00 2001 From: yitter Date: Tue, 30 Mar 2021 01:29:03 +0800 Subject: [PATCH] auto commit --- C#.NET/source/Yitter.IdGenTest/Program.cs | 34 +++- .../Properties/launchSettings.json | 8 + .../Yitter.IdGenTest/Yitter.IdGenTest.csproj | 4 + C/source/YitIdHelper.h | 8 +- C/source/idgen/common.h | 2 + C/source/main.c | 6 +- Go/README.md | 6 + Go/source/test/main.go | 7 + Java/README.md | 7 +- Java/source/pom.xml | 164 +++++++++++------- .../yitter/contract/IIdGenerator.java | 2 +- .../yitter/contract/ISnowWorker.java | 2 +- .../yitter/contract/IdGeneratorException.java | 2 +- .../yitter/contract/IdGeneratorOptions.java | 2 +- .../yitter/contract/OverCostActionArg.java | 2 +- .../yitter/core/SnowWorkerM1.java | 10 +- .../yitter/core/SnowWorkerM2.java | 6 +- .../yitter/idgen/DefaultIdGenerator.java | 14 +- .../yitter/idgen/YitIdHelper.java | 88 +++++----- .../com/{ => github}/yitter/test/GenTest.java | 4 +- .../com/{ => github}/yitter/test/StartUp.java | 10 +- README.md | 2 + Rust/source/build-release.bat | 3 + 23 files changed, 241 insertions(+), 152 deletions(-) create mode 100644 C#.NET/source/Yitter.IdGenTest/Properties/launchSettings.json rename Java/source/src/main/java/com/{ => github}/yitter/contract/IIdGenerator.java (80%) rename Java/source/src/main/java/com/{ => github}/yitter/contract/ISnowWorker.java (80%) rename Java/source/src/main/java/com/{ => github}/yitter/contract/IdGeneratorException.java (94%) rename Java/source/src/main/java/com/{ => github}/yitter/contract/IdGeneratorOptions.java (93%) rename Java/source/src/main/java/com/{ => github}/yitter/contract/OverCostActionArg.java (92%) rename Java/source/src/main/java/com/{ => github}/yitter/core/SnowWorkerM1.java (93%) rename Java/source/src/main/java/com/{ => github}/yitter/core/SnowWorkerM2.java (85%) rename Java/source/src/main/java/com/{ => github}/yitter/idgen/DefaultIdGenerator.java (85%) rename Java/source/src/main/java/com/{ => github}/yitter/idgen/YitIdHelper.java (81%) rename Java/source/src/main/java/com/{ => github}/yitter/test/GenTest.java (87%) rename Java/source/src/main/java/com/{ => github}/yitter/test/StartUp.java (85%) create mode 100644 Rust/source/build-release.bat diff --git a/C#.NET/source/Yitter.IdGenTest/Program.cs b/C#.NET/source/Yitter.IdGenTest/Program.cs index ad9dc75..3f57391 100644 --- a/C#.NET/source/Yitter.IdGenTest/Program.cs +++ b/C#.NET/source/Yitter.IdGenTest/Program.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading; +using System.Threading.Tasks; using Yitter.IdGenerator; namespace Yitter.OrgSystem.TestA @@ -54,20 +55,23 @@ namespace Yitter.OrgSystem.TestA while (true) { - RunSingle(); - // Go(options); - //CallDll(); + //RunSingle(); + //Go(options); + CallDll(); Thread.Sleep(1000); // 每隔1秒执行一次Go } } - [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.Cdecl)] + //[DllImport("yitidgenc.dll", CallingConvention = CallingConvention.StdCall)] + //public static extern long NextId(); + + [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.StdCall)] public static extern long NextId(); - [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.StdCall)] public static extern void SetWorkerId(uint workerId); - [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("yitidgenc.dll", CallingConvention = CallingConvention.StdCall)] public static extern int TestId(); private static void CallDll() @@ -78,15 +82,27 @@ namespace Yitter.OrgSystem.TestA int i = 0; long id = 0; DateTime start = DateTime.Now; + bool useMultiThread = false; - var ids = TestId(); - + //var ids = TestId(); //SetWorkerId(1); while (i < 50000) { - id = NextId(); i++; + + if (useMultiThread) + { + Task.Run(() => + { + id = NextId(); + Console.WriteLine("id:" + id); + }); + } + else + { + id = NextId(); + } } DateTime end = DateTime.Now; Console.WriteLine("id:" + id); diff --git a/C#.NET/source/Yitter.IdGenTest/Properties/launchSettings.json b/C#.NET/source/Yitter.IdGenTest/Properties/launchSettings.json new file mode 100644 index 0000000..d27f545 --- /dev/null +++ b/C#.NET/source/Yitter.IdGenTest/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Yitter.IdGenTest": { + "commandName": "Project", + "nativeDebugging": true + } + } +} \ No newline at end of file diff --git a/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj b/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj index cc46a7d..9ce00e5 100644 --- a/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj +++ b/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj @@ -12,6 +12,10 @@ MIT + + x64 + + diff --git a/C/source/YitIdHelper.h b/C/source/YitIdHelper.h index 1a53560..2181b22 100644 --- a/C/source/YitIdHelper.h +++ b/C/source/YitIdHelper.h @@ -9,13 +9,13 @@ TAP_DLLEXPORT -extern void SetIdGenerator(IdGeneratorOptions options); +extern void TAP_STDCALL SetIdGenerator(IdGeneratorOptions options); TAP_DLLEXPORT -extern void SetWorkerId(uint32_t workerId); +extern void TAP_STDCALL SetWorkerId(uint32_t workerId); TAP_DLLEXPORT -extern uint64_t NextId(); +extern uint64_t TAP_STDCALL NextId(); TAP_DLLEXPORT -extern uint64_t TestId() ; +extern uint64_t TAP_STDCALL TestId(); diff --git a/C/source/idgen/common.h b/C/source/idgen/common.h index 3a27611..89522f2 100644 --- a/C/source/idgen/common.h +++ b/C/source/idgen/common.h @@ -5,9 +5,11 @@ #ifdef _WIN32 #define TAP_CDECL __cdecl +#define TAP_STDCALL __stdcall #define TAP_DLLEXPORT __declspec(dllexport) #else #define TAP_CDECL +#define TAP_STDCALL #define TAP_DLLEXPORT #endif diff --git a/C/source/main.c b/C/source/main.c index 7ed607f..bc5d89c 100644 --- a/C/source/main.c +++ b/C/source/main.c @@ -24,7 +24,7 @@ void RunMultiThread() { //int64_t start = GetCurrentMicroTime(); for (int i = 0; i < GenIdCount / threadCount; i++) { int64_t id = NextId(); - printf("生成ID: %D\n", id); + printf("ID: %D\n", id); } int64_t end = GetCurrentMicroTime(); @@ -35,11 +35,11 @@ void RunSingle() { int64_t start = GetCurrentMicroTime(); for (int i = 0; i < GenIdCount; i++) { int64_t id = NextId(); -// printf("生成ID: %ld\n", id); +// printf("ID: %ld\n", id); } int64_t end = GetCurrentMicroTime(); - printf("%s,total:%d μs\n", method == 1 ? "1" : "2", (end - start)); + printf("%s, total: %d us\n", method == 1 ? "1" : "2", (end - start)); } int main() { diff --git a/Go/README.md b/Go/README.md index 7a56931..bde43ae 100644 --- a/Go/README.md +++ b/Go/README.md @@ -1,5 +1,11 @@ # idgenerator +## + +Goרڣhttps://gitee.com/yitter/idgenerator-go + + Go רΪ׼ + ## Go 1.SDKgo1.16 diff --git a/Go/source/test/main.go b/Go/source/test/main.go index 2dbc1c7..f1263c5 100644 --- a/Go/source/test/main.go +++ b/Go/source/test/main.go @@ -1,12 +1,19 @@ package main import ( + "C" "fmt" "time" "yitidgen/contract" "yitidgen/gen" ) + +//export NextId +func NextId() uint64{ + return gen.GetIns().NextId() +} + func main() { // 方法一:直接采用默认方法生成一个Id var yid = gen.YitIdHelper{} diff --git a/Java/README.md b/Java/README.md index d664343..a12638d 100644 --- a/Java/README.md +++ b/Java/README.md @@ -5,7 +5,12 @@ JDK 1.8+ ## maven ``` - + + com.github.yitter + yitter-idgenerator + 1.0.1 + pom + ``` ## ʾ diff --git a/Java/source/pom.xml b/Java/source/pom.xml index 811f482..73bc754 100644 --- a/Java/source/pom.xml +++ b/Java/source/pom.xml @@ -4,23 +4,40 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.yitter - yitter.idgenerator + com.github.yitter + yitter-idgenerator jar - 1.0.0 + 1.0.1 - yitter.idgenerator - Shorter ID and faster generation with a new snowflake drift algorithm. The core is to shorten the ID length, but also can have a very high instantaneous concurrent processing capacity (50W/0.1s), and powerful configuration capacity. + yitter-idgenerator + Shorter ID and faster generation with a new snowflake drift algorithm. The core is to shorten the ID + length, but also can have a very high instantaneous concurrent processing capacity (50W/0.1s), and powerful + configuration capacity. + + https://github.com/yitter/idgenerator yitter yitter yitter@126.com - https://gitee.com/yitter/idgenerator + https://github.com/yitter/idgenerator + + scm:git:https://github.com/yitter/idgenerator.git + scm:git:https://github.com/yitter/idgenerator.git + https://github.com/yitter/idgenerator.git + + + + + MIT + https://github.com/yitter/IdGenerator/blob/main/LICENSE + + + UTF-8 UTF-8 @@ -30,64 +47,85 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - ${java.version} - ${java.version} - UTF-8 - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - ${project.basedir} - META-INF - - LICENSE - NOTICE - - - - src/main/resources - true - - ** - - - - - - src/test/resources - - ** - - - + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + package + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + + package + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://s01.oss.sonatype.org/ + false + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + ${java.version} + ${java.version} + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + \ No newline at end of file diff --git a/Java/source/src/main/java/com/yitter/contract/IIdGenerator.java b/Java/source/src/main/java/com/github/yitter/contract/IIdGenerator.java similarity index 80% rename from Java/source/src/main/java/com/yitter/contract/IIdGenerator.java rename to Java/source/src/main/java/com/github/yitter/contract/IIdGenerator.java index e0c28d5..78f3565 100644 --- a/Java/source/src/main/java/com/yitter/contract/IIdGenerator.java +++ b/Java/source/src/main/java/com/github/yitter/contract/IIdGenerator.java @@ -2,7 +2,7 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.contract; +package com.github.yitter.contract; public interface IIdGenerator { long newLong() throws IdGeneratorException; diff --git a/Java/source/src/main/java/com/yitter/contract/ISnowWorker.java b/Java/source/src/main/java/com/github/yitter/contract/ISnowWorker.java similarity index 80% rename from Java/source/src/main/java/com/yitter/contract/ISnowWorker.java rename to Java/source/src/main/java/com/github/yitter/contract/ISnowWorker.java index 4ba7b67..6172aed 100644 --- a/Java/source/src/main/java/com/yitter/contract/ISnowWorker.java +++ b/Java/source/src/main/java/com/github/yitter/contract/ISnowWorker.java @@ -2,7 +2,7 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.contract; +package com.github.yitter.contract; public interface ISnowWorker { long nextId() throws IdGeneratorException; diff --git a/Java/source/src/main/java/com/yitter/contract/IdGeneratorException.java b/Java/source/src/main/java/com/github/yitter/contract/IdGeneratorException.java similarity index 94% rename from Java/source/src/main/java/com/yitter/contract/IdGeneratorException.java rename to Java/source/src/main/java/com/github/yitter/contract/IdGeneratorException.java index d3cb02e..750c7e0 100644 --- a/Java/source/src/main/java/com/yitter/contract/IdGeneratorException.java +++ b/Java/source/src/main/java/com/github/yitter/contract/IdGeneratorException.java @@ -2,7 +2,7 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.contract; +package com.github.yitter.contract; public class IdGeneratorException extends RuntimeException { diff --git a/Java/source/src/main/java/com/yitter/contract/IdGeneratorOptions.java b/Java/source/src/main/java/com/github/yitter/contract/IdGeneratorOptions.java similarity index 93% rename from Java/source/src/main/java/com/yitter/contract/IdGeneratorOptions.java rename to Java/source/src/main/java/com/github/yitter/contract/IdGeneratorOptions.java index 2d1dfbb..029b482 100644 --- a/Java/source/src/main/java/com/yitter/contract/IdGeneratorOptions.java +++ b/Java/source/src/main/java/com/github/yitter/contract/IdGeneratorOptions.java @@ -2,7 +2,7 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.contract; +package com.github.yitter.contract; /** * 雪花算法使用的参数 diff --git a/Java/source/src/main/java/com/yitter/contract/OverCostActionArg.java b/Java/source/src/main/java/com/github/yitter/contract/OverCostActionArg.java similarity index 92% rename from Java/source/src/main/java/com/yitter/contract/OverCostActionArg.java rename to Java/source/src/main/java/com/github/yitter/contract/OverCostActionArg.java index 8192eb0..f735776 100644 --- a/Java/source/src/main/java/com/yitter/contract/OverCostActionArg.java +++ b/Java/source/src/main/java/com/github/yitter/contract/OverCostActionArg.java @@ -2,7 +2,7 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.contract; +package com.github.yitter.contract; /** * Id生成时回调参数 diff --git a/Java/source/src/main/java/com/yitter/core/SnowWorkerM1.java b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java similarity index 93% rename from Java/source/src/main/java/com/yitter/core/SnowWorkerM1.java rename to Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java index d793c43..a6c8c85 100644 --- a/Java/source/src/main/java/com/yitter/core/SnowWorkerM1.java +++ b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM1.java @@ -2,12 +2,12 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.core; +package com.github.yitter.core; -import com.yitter.contract.ISnowWorker; -import com.yitter.contract.IdGeneratorException; -import com.yitter.contract.IdGeneratorOptions; -import com.yitter.contract.OverCostActionArg; +import com.github.yitter.contract.ISnowWorker; +import com.github.yitter.contract.IdGeneratorOptions; +import com.github.yitter.contract.OverCostActionArg; +import com.github.yitter.contract.IdGeneratorException; public class SnowWorkerM1 implements ISnowWorker { diff --git a/Java/source/src/main/java/com/yitter/core/SnowWorkerM2.java b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM2.java similarity index 85% rename from Java/source/src/main/java/com/yitter/core/SnowWorkerM2.java rename to Java/source/src/main/java/com/github/yitter/core/SnowWorkerM2.java index eb2ffe3..5a87184 100644 --- a/Java/source/src/main/java/com/yitter/core/SnowWorkerM2.java +++ b/Java/source/src/main/java/com/github/yitter/core/SnowWorkerM2.java @@ -2,10 +2,10 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.core; +package com.github.yitter.core; -import com.yitter.contract.IdGeneratorException; -import com.yitter.contract.IdGeneratorOptions; +import com.github.yitter.contract.IdGeneratorOptions; +import com.github.yitter.contract.IdGeneratorException; public class SnowWorkerM2 extends SnowWorkerM1 { diff --git a/Java/source/src/main/java/com/yitter/idgen/DefaultIdGenerator.java b/Java/source/src/main/java/com/github/yitter/idgen/DefaultIdGenerator.java similarity index 85% rename from Java/source/src/main/java/com/yitter/idgen/DefaultIdGenerator.java rename to Java/source/src/main/java/com/github/yitter/idgen/DefaultIdGenerator.java index 9443501..583f205 100644 --- a/Java/source/src/main/java/com/yitter/idgen/DefaultIdGenerator.java +++ b/Java/source/src/main/java/com/github/yitter/idgen/DefaultIdGenerator.java @@ -2,14 +2,14 @@ * 版权属于:yitter(yitter@126.com) * 开源地址:https://gitee.com/yitter/idgenerator */ -package com.yitter.idgen; +package com.github.yitter.idgen; -import com.yitter.contract.ISnowWorker; -import com.yitter.contract.IdGeneratorException; -import com.yitter.contract.IdGeneratorOptions; -import com.yitter.contract.IIdGenerator; -import com.yitter.core.SnowWorkerM1; -import com.yitter.core.SnowWorkerM2; +import com.github.yitter.contract.IIdGenerator; +import com.github.yitter.contract.ISnowWorker; +import com.github.yitter.contract.IdGeneratorException; +import com.github.yitter.contract.IdGeneratorOptions; +import com.github.yitter.core.SnowWorkerM1; +import com.github.yitter.core.SnowWorkerM2; public class DefaultIdGenerator implements IIdGenerator { diff --git a/Java/source/src/main/java/com/yitter/idgen/YitIdHelper.java b/Java/source/src/main/java/com/github/yitter/idgen/YitIdHelper.java similarity index 81% rename from Java/source/src/main/java/com/yitter/idgen/YitIdHelper.java rename to Java/source/src/main/java/com/github/yitter/idgen/YitIdHelper.java index 35ada5d..c0d6105 100644 --- a/Java/source/src/main/java/com/yitter/idgen/YitIdHelper.java +++ b/Java/source/src/main/java/com/github/yitter/idgen/YitIdHelper.java @@ -1,45 +1,43 @@ -/* - * 版权属于:yitter(yitter@126.com) - * 开源地址:https://gitee.com/yitter/idgenerator - */ -package com.yitter.idgen; - -import com.yitter.contract.IdGeneratorException; -import com.yitter.contract.IdGeneratorOptions; -import com.yitter.contract.IIdGenerator; - -/** - * 这是一个调用的例子,默认情况下,单机集成者可以直接使用 nextId()。 - */ -public class YitIdHelper { - - private static IIdGenerator idGenInstance = null; - - public static IIdGenerator getIdGenInstance() { - return idGenInstance; - } - - - /** - * 设置参数,建议程序初始化时执行一次 - * - * @param options - */ - public static void setIdGenerator(IdGeneratorOptions options) throws IdGeneratorException { - idGenInstance = new DefaultIdGenerator(options); - } - - /** - * 生成新的Id - * 调用本方法前,请确保调用了 SetIdGenerator 方法做初始化。 - * - * @return - */ - public static long nextId() throws IdGeneratorException { - if (idGenInstance == null) { - idGenInstance = new DefaultIdGenerator(new IdGeneratorOptions((short) 1)); - } - - return idGenInstance.newLong(); - } -} +/* + * 版权属于:yitter(yitter@126.com) + * 开源地址:https://gitee.com/yitter/idgenerator + */ +package com.github.yitter.idgen; + +import com.github.yitter.contract.IIdGenerator; +import com.github.yitter.contract.IdGeneratorException; +import com.github.yitter.contract.IdGeneratorOptions; + +/** + * 这是一个调用的例子,默认情况下,单机集成者可以直接使用 nextId()。 + */ +public class YitIdHelper { + + private static IIdGenerator idGenInstance = null; + + public static IIdGenerator getIdGenInstance() { + return idGenInstance; + } + + + /** + * 设置参数,建议程序初始化时执行一次 + */ + public static void setIdGenerator(IdGeneratorOptions options) throws IdGeneratorException { + idGenInstance = new DefaultIdGenerator(options); + } + + /** + * 生成新的Id + * 调用本方法前,请确保调用了 SetIdGenerator 方法做初始化。 + * + * @return + */ + public static long nextId() throws IdGeneratorException { + if (idGenInstance == null) { + idGenInstance = new DefaultIdGenerator(new IdGeneratorOptions((short) 1)); + } + + return idGenInstance.newLong(); + } +} diff --git a/Java/source/src/main/java/com/yitter/test/GenTest.java b/Java/source/src/main/java/com/github/yitter/test/GenTest.java similarity index 87% rename from Java/source/src/main/java/com/yitter/test/GenTest.java rename to Java/source/src/main/java/com/github/yitter/test/GenTest.java index 6a4647c..e0589e5 100644 --- a/Java/source/src/main/java/com/yitter/test/GenTest.java +++ b/Java/source/src/main/java/com/github/yitter/test/GenTest.java @@ -1,6 +1,6 @@ -package com.yitter.test; +package com.github.yitter.test; -import com.yitter.contract.IIdGenerator; +import com.github.yitter.contract.IIdGenerator; import java.util.HashSet; import java.util.Set; diff --git a/Java/source/src/main/java/com/yitter/test/StartUp.java b/Java/source/src/main/java/com/github/yitter/test/StartUp.java similarity index 85% rename from Java/source/src/main/java/com/yitter/test/StartUp.java rename to Java/source/src/main/java/com/github/yitter/test/StartUp.java index 6f5e575..0bdf764 100644 --- a/Java/source/src/main/java/com/yitter/test/StartUp.java +++ b/Java/source/src/main/java/com/github/yitter/test/StartUp.java @@ -1,9 +1,9 @@ -package com.yitter.test; +package com.github.yitter.test; -import com.yitter.contract.IdGeneratorOptions; -import com.yitter.contract.IIdGenerator; -import com.yitter.idgen.DefaultIdGenerator; -import com.yitter.idgen.YitIdHelper; +import com.github.yitter.contract.IIdGenerator; +import com.github.yitter.contract.IdGeneratorOptions; +import com.github.yitter.idgen.DefaultIdGenerator; +import com.github.yitter.idgen.YitIdHelper; public class StartUp { diff --git a/README.md b/README.md index b78c047..2e22927 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ QQ群:646049993 6.不依赖任何外部缓存和数据库。(当然 WorkerId 须由外部指定) +7.基础功能,开箱即用,无需配置文件、数据库连接等。 + ## 性能数据 (参数:10位自增序列,1000次漂移最大值) diff --git a/Rust/source/build-release.bat b/Rust/source/build-release.bat new file mode 100644 index 0000000..1580c9d --- /dev/null +++ b/Rust/source/build-release.bat @@ -0,0 +1,3 @@ +@echo off +cargo build --release +@pause \ No newline at end of file