-
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 #3480 from akkadotnet/dev
Akka.NET v1.3.8 Stable Release
- Loading branch information
Showing
60 changed files
with
2,645 additions
and
178 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using Akka; | ||
using Akka.Actor; | ||
using Akka.Streams; | ||
using Akka.Streams.Dsl; | ||
using Akka.TestKit.Xunit2; | ||
using Xunit; | ||
|
||
namespace DocsExamples.Streams | ||
{ | ||
public class FlowDocTests : TestKit | ||
{ | ||
[Fact] | ||
public void Source_prematerialization() | ||
{ | ||
#region source-prematerialization | ||
|
||
var matPoweredSource = | ||
Source.ActorRef<string>(bufferSize: 100, overflowStrategy: OverflowStrategy.Fail); | ||
|
||
Tuple<IActorRef, Source<string, NotUsed>> materialized = matPoweredSource.PreMaterialize(Sys.Materializer()); | ||
|
||
var actorRef = materialized.Item1; | ||
var source = materialized.Item2; | ||
|
||
actorRef.Tell("hit"); | ||
|
||
// pass source around for materialization | ||
source.RunWith(Sink.ForEach<string>(Console.WriteLine), Sys.Materializer()); | ||
|
||
#endregion | ||
} | ||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
src/benchmark/Akka.Benchmarks/Actor/ActorPathBenchmarks.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,51 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="ActorPathBenchmarks.cs" company="Akka.NET Project"> | ||
// Copyright (C) 2009-2018 Lightbend Inc. <http://www.lightbend.com> | ||
// Copyright (C) 2013-2018 .NET Foundation <https://github.com/akkadotnet/akka.net> | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
using Akka.Actor; | ||
using Akka.Benchmarks.Configurations; | ||
using BenchmarkDotNet.Attributes; | ||
|
||
namespace Akka.Benchmarks.Actor | ||
{ | ||
[Config(typeof(MicroBenchmarkConfig))] | ||
public class ActorPathBenchmarks | ||
{ | ||
private ActorPath x; | ||
private ActorPath y; | ||
|
||
[GlobalSetup] | ||
public void Setup() | ||
{ | ||
x = new RootActorPath(new Address("akka.tcp", "system", "127.0.0.1", 1337), "user"); | ||
y = new RootActorPath(new Address("akka.tcp", "system", "127.0.0.1", 1337), "system"); | ||
} | ||
|
||
[Benchmark] | ||
public ActorPath ActorPath_Parse() | ||
{ | ||
return ActorPath.Parse("akka.tcp://system/user/parent/child"); | ||
} | ||
|
||
[Benchmark] | ||
public ActorPath ActorPath_Concat() | ||
{ | ||
return x / "parent" / "child"; | ||
} | ||
|
||
[Benchmark] | ||
public bool ActorPath_Equals() | ||
{ | ||
return x == y; | ||
} | ||
|
||
[Benchmark] | ||
public string ActorPath_ToString() | ||
{ | ||
return x.ToString(); | ||
} | ||
} | ||
} |
Oops, something went wrong.