Skip to content

Commit 3096eeb

Browse files
committed
Updates to v5.0.21
1 parent 8406508 commit 3096eeb

File tree

8 files changed

+24
-33
lines changed

8 files changed

+24
-33
lines changed

LiteDB.Benchmarks/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ static void Main(string[] args)
1515
BenchmarkRunner.Run(typeof(Program).Assembly, DefaultConfig.Instance
1616
//.With(new BenchmarkDotNet.Filters.AnyCategoriesFilter(new[] { Benchmarks.Constants.Categories.GENERAL }))
1717
//.AddFilter(new BenchmarkDotNet.Filters.AnyCategoriesFilter([Benchmarks.Constants.Categories.GENERAL]))
18-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core60)
18+
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core80)
1919
.WithJit(Jit.RyuJit)
20-
.WithToolchain(CsProjCoreToolchain.NetCoreApp60)
20+
.WithToolchain(CsProjCoreToolchain.NetCoreApp80)
2121
.WithGcForce(true))
2222
/*.With(Job.Default.With(MonoRuntime.Default)
2323
.With(Jit.Llvm)

LiteDB.Stress/Examples/test-01.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
<updateDate type="date" range="1960-01-01~2018-12-31" />
1010
<jsonData>{ myItem: 'abc', array: [1, 2, 3] }</jsonData>
1111
</insert>
12-
<task name="UPDATE" sleep="8s">UPDATE col1 SET name = UPPER(name), large=LPAD(name, RANDOM(50, 3000), 'x')</task>
13-
<task name="DELETE" sleep="45s">DELETE col1 WHERE 1 = 1</task>
12+
<task name="UPDATE" sleep="10s">UPDATE col1 SET name = UPPER(name), large=LPAD(name, RANDOM(50, 3000), 'x')</task>
13+
<task name="DELETE" sleep="10s">DELETE col1 WHERE 1 = 1</task>
1414
<task name="CHECKPOINT" sleep="10s">CHECKPOINT</task>
15-
<task name="COUNT" sleep="1s">SELECT COUNT(*) FROM col1</task>
16-
<task name="SIZE" sleep="1s">SELECT { data: FORMAT(dataFileSize, 'n0'), log: FORMAT(logFileSize, 'n0') } FROM $database</task>
15+
<task name="COUNT" sleep="10s">SELECT COUNT(*) FROM col1</task>
16+
<task name="SIZE" sleep="10s">SELECT { data: FORMAT(dataFileSize, 'n0'), log: FORMAT(logFileSize, 'n0') } FROM $database</task>
1717
</test>

LiteDB.Stress/LiteDB.Stress.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6</TargetFramework>
5+
<TargetFramework>net8</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

LiteDB.Stress/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"profiles": {
33
"LiteDB.Stress": {
44
"commandName": "Project",
5-
"commandLineArgs": "../../../Examples/test-02.xml"
5+
"commandLineArgs": "../../../Examples/test-01.xml"
66
}
77
}
88
}

LiteDB.Stress/Test/InsertTaskItem.cs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,23 @@ public InsertTaskItem(XmlElement el)
4141

4242
public BsonValue Execute(LiteDatabase db)
4343
{
44-
IEnumerable<BsonDocument> source()
45-
{
46-
var count = _rnd.Next(this.MinRange, this.MaxRange);
44+
_collection ??= db.GetCollection(this.Collection, this.AutoId);
4745

48-
for(var i = 0; i < count; i++)
49-
{
50-
var doc = new BsonDocument();
46+
var count = _rnd.Next(this.MinRange, this.MaxRange);
5147

52-
foreach(var field in this.Fields)
53-
{
54-
doc[field.Name] = field.GetValue();
55-
}
48+
for(var i = 0; i < count; i++)
49+
{
50+
var doc = new BsonDocument();
5651

57-
yield return doc;
52+
foreach(var field in this.Fields)
53+
{
54+
doc[field.Name] = field.GetValue();
5855
}
59-
}
6056

61-
_collection ??= db.GetCollection(this.Collection, this.AutoId);
57+
_collection.Insert(doc);
58+
}
6259

63-
return _collection.Insert(source());
60+
return count;
6461
}
6562
}
6663
}

LiteDB.Tests/LiteDB.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6</TargetFramework>
4+
<TargetFramework>net8</TargetFramework>
55
<AssemblyName>LiteDB.Tests</AssemblyName>
66
<RootNamespace>LiteDB.Tests</RootNamespace>
77
<Authors>Maurício David</Authors>

LiteDB.sln

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB.Benchmarks", "LiteDB
1313
EndProject
1414
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB.Stress", "LiteDB.Stress\LiteDB.Stress.csproj", "{FFBC5669-DA32-4907-8793-7B414279DA3B}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{E8763934-E46A-4AAF-A2B5-E812016DAF84}"
17-
EndProject
1816
Global
1917
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2018
Debug|Any CPU = Debug|Any CPU
@@ -41,10 +39,6 @@ Global
4139
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
4240
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
4341
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Release|Any CPU.Build.0 = Release|Any CPU
44-
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45-
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Debug|Any CPU.Build.0 = Debug|Any CPU
46-
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Release|Any CPU.ActiveCfg = Release|Any CPU
47-
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Release|Any CPU.Build.0 = Release|Any CPU
4842
EndGlobalSection
4943
GlobalSection(SolutionProperties) = preSolution
5044
HideSolutionNode = FALSE

LiteDB/LiteDB.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net4.5;netstandard1.3;netstandard2.0</TargetFrameworks>
5-
<AssemblyVersion>5.0.20</AssemblyVersion>
6-
<FileVersion>5.0.20</FileVersion>
7-
<VersionPrefix>5.0.20</VersionPrefix>
8-
<PackageVersion>5.0.20</PackageVersion>
5+
<AssemblyVersion>5.0.21</AssemblyVersion>
6+
<FileVersion>5.0.21</FileVersion>
7+
<VersionPrefix>5.0.21</VersionPrefix>
8+
<PackageVersion>5.0.21</PackageVersion>
99
<Authors>Maurício David</Authors>
1010
<Product>LiteDB</Product>
1111
<Description>LiteDB - A lightweight embedded .NET NoSQL document store in a single datafile</Description>

0 commit comments

Comments
 (0)