-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5096 from akkadotnet/dev
v1.4.21 Release
- Loading branch information
Showing
103 changed files
with
2,993 additions
and
1,165 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/benchmark/Akka.Benchmarks/Actor/ActorMemoryFootprintBenchmark.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="ActorMemoryFootprintBenchmarks.cs" company="Akka.NET Project"> | ||
// Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com> | ||
// Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net> | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Akka.Actor; | ||
using Akka.Benchmarks.Configurations; | ||
using BenchmarkDotNet.Attributes; | ||
using BenchmarkDotNet.Engines; | ||
|
||
namespace Akka.Benchmarks.Actor | ||
{ | ||
[Config(typeof(MicroBenchmarkConfig))] | ||
[SimpleJob(RunStrategy.Monitoring, targetCount: 25, warmupCount: 5)] | ||
public class ActorMemoryFootprintBenchmark | ||
{ | ||
public ActorSystem Sys; | ||
public Props Props; | ||
|
||
[Params(10_000)] | ||
public int SpawnCount { get; set; } | ||
|
||
[GlobalSetup] | ||
public void Setup() | ||
{ | ||
Sys = ActorSystem.Create("Bench"); | ||
Props = Props.Create(() => new TempActor()); | ||
} | ||
|
||
private class TempActor : UntypedActor | ||
{ | ||
protected override void OnReceive(object message) | ||
{ | ||
|
||
} | ||
} | ||
|
||
[Benchmark] | ||
public void SpawnActor() | ||
{ | ||
for(var i = 0; i < SpawnCount; i++) | ||
Sys.ActorOf(Props); | ||
} | ||
|
||
[GlobalCleanup] | ||
public async Task Cleanup() | ||
{ | ||
await Sys.Terminate(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/benchmark/Akka.Benchmarks/Actor/NameAndUidBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="NameAndUidBenchmarks.cs" company="Akka.NET Project"> | ||
// Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com> | ||
// Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net> | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Akka.Actor; | ||
using Akka.Benchmarks.Configurations; | ||
using BenchmarkDotNet.Attributes; | ||
|
||
namespace Akka.Benchmarks.Actor | ||
{ | ||
[Config(typeof(MicroBenchmarkConfig))] | ||
public class NameAndUidBenchmarks | ||
{ | ||
public const string ActorPath = "foo#11241311"; | ||
|
||
[Benchmark] | ||
public NameAndUid ActorCell_SplitNameAndUid() | ||
{ | ||
return ActorCell.SplitNameAndUid(ActorPath); | ||
} | ||
|
||
[Benchmark] | ||
public (string name, int uid) ActorCell_GetNameAndUid() | ||
{ | ||
return ActorCell.GetNameAndUid(ActorPath); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.