Skip to content

Commit

Permalink
Merge pull request litedb-org#2517 from mbdavid/update-v5
Browse files Browse the repository at this point in the history
Updates to v5.0.21
  • Loading branch information
mbdavid authored Jul 5, 2024
2 parents 8406508 + 3096eeb commit 391cc93
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 33 deletions.
4 changes: 2 additions & 2 deletions LiteDB.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ static void Main(string[] args)
BenchmarkRunner.Run(typeof(Program).Assembly, DefaultConfig.Instance
//.With(new BenchmarkDotNet.Filters.AnyCategoriesFilter(new[] { Benchmarks.Constants.Categories.GENERAL }))
//.AddFilter(new BenchmarkDotNet.Filters.AnyCategoriesFilter([Benchmarks.Constants.Categories.GENERAL]))
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core60)
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core80)
.WithJit(Jit.RyuJit)
.WithToolchain(CsProjCoreToolchain.NetCoreApp60)
.WithToolchain(CsProjCoreToolchain.NetCoreApp80)
.WithGcForce(true))
/*.With(Job.Default.With(MonoRuntime.Default)
.With(Jit.Llvm)
Expand Down
8 changes: 4 additions & 4 deletions LiteDB.Stress/Examples/test-01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<updateDate type="date" range="1960-01-01~2018-12-31" />
<jsonData>{ myItem: 'abc', array: [1, 2, 3] }</jsonData>
</insert>
<task name="UPDATE" sleep="8s">UPDATE col1 SET name = UPPER(name), large=LPAD(name, RANDOM(50, 3000), 'x')</task>
<task name="DELETE" sleep="45s">DELETE col1 WHERE 1 = 1</task>
<task name="UPDATE" sleep="10s">UPDATE col1 SET name = UPPER(name), large=LPAD(name, RANDOM(50, 3000), 'x')</task>
<task name="DELETE" sleep="10s">DELETE col1 WHERE 1 = 1</task>
<task name="CHECKPOINT" sleep="10s">CHECKPOINT</task>
<task name="COUNT" sleep="1s">SELECT COUNT(*) FROM col1</task>
<task name="SIZE" sleep="1s">SELECT { data: FORMAT(dataFileSize, 'n0'), log: FORMAT(logFileSize, 'n0') } FROM $database</task>
<task name="COUNT" sleep="10s">SELECT COUNT(*) FROM col1</task>
<task name="SIZE" sleep="10s">SELECT { data: FORMAT(dataFileSize, 'n0'), log: FORMAT(logFileSize, 'n0') } FROM $database</task>
</test>
2 changes: 1 addition & 1 deletion LiteDB.Stress/LiteDB.Stress.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LiteDB.Stress/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"LiteDB.Stress": {
"commandName": "Project",
"commandLineArgs": "../../../Examples/test-02.xml"
"commandLineArgs": "../../../Examples/test-01.xml"
}
}
}
25 changes: 11 additions & 14 deletions LiteDB.Stress/Test/InsertTaskItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,23 @@ public InsertTaskItem(XmlElement el)

public BsonValue Execute(LiteDatabase db)
{
IEnumerable<BsonDocument> source()
{
var count = _rnd.Next(this.MinRange, this.MaxRange);
_collection ??= db.GetCollection(this.Collection, this.AutoId);

for(var i = 0; i < count; i++)
{
var doc = new BsonDocument();
var count = _rnd.Next(this.MinRange, this.MaxRange);

foreach(var field in this.Fields)
{
doc[field.Name] = field.GetValue();
}
for(var i = 0; i < count; i++)
{
var doc = new BsonDocument();

yield return doc;
foreach(var field in this.Fields)
{
doc[field.Name] = field.GetValue();
}
}

_collection ??= db.GetCollection(this.Collection, this.AutoId);
_collection.Insert(doc);
}

return _collection.Insert(source());
return count;
}
}
}
2 changes: 1 addition & 1 deletion LiteDB.Tests/LiteDB.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
<AssemblyName>LiteDB.Tests</AssemblyName>
<RootNamespace>LiteDB.Tests</RootNamespace>
<Authors>Maurício David</Authors>
Expand Down
6 changes: 0 additions & 6 deletions LiteDB.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB.Benchmarks", "LiteDB
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB.Stress", "LiteDB.Stress\LiteDB.Stress.csproj", "{FFBC5669-DA32-4907-8793-7B414279DA3B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{E8763934-E46A-4AAF-A2B5-E812016DAF84}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -41,10 +39,6 @@ Global
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFBC5669-DA32-4907-8793-7B414279DA3B}.Release|Any CPU.Build.0 = Release|Any CPU
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8763934-E46A-4AAF-A2B5-E812016DAF84}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 4 additions & 4 deletions LiteDB/LiteDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<PropertyGroup>
<TargetFrameworks>net4.5;netstandard1.3;netstandard2.0</TargetFrameworks>
<AssemblyVersion>5.0.20</AssemblyVersion>
<FileVersion>5.0.20</FileVersion>
<VersionPrefix>5.0.20</VersionPrefix>
<PackageVersion>5.0.20</PackageVersion>
<AssemblyVersion>5.0.21</AssemblyVersion>
<FileVersion>5.0.21</FileVersion>
<VersionPrefix>5.0.21</VersionPrefix>
<PackageVersion>5.0.21</PackageVersion>
<Authors>Maurício David</Authors>
<Product>LiteDB</Product>
<Description>LiteDB - A lightweight embedded .NET NoSQL document store in a single datafile</Description>
Expand Down

0 comments on commit 391cc93

Please sign in to comment.