-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More options formatting, and related cleanup (#3947)
* More options formatting, and other cleanup Added formatters for grain directory options, grain placement options, schedualling options, thread pool options, type managment options, versioning options and silo options. Fixed formatting of messaging options. Fixed some options defaults. * Fixed naming issue (PR feedback) Cleaned up registeration order, it seems options are logged in order of registeration (by default). Not an expected or necessary behavior.
- Loading branch information
1 parent
08db51d
commit 00bab73
Showing
16 changed files
with
244 additions
and
39 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
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
24 changes: 24 additions & 0 deletions
24
src/Orleans.Core/Configuration/Options/ThreadPoolOptions.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 |
---|---|---|
@@ -1,9 +1,33 @@ | ||
|
||
using Microsoft.Extensions.Options; | ||
using System.Collections.Generic; | ||
|
||
namespace Orleans.Hosting | ||
{ | ||
public class ThreadPoolOptions | ||
{ | ||
public int MinDotNetThreadPoolSize { get; set; } = DEFAULT_MIN_DOT_NET_THREAD_POOL_SIZE; | ||
public const int DEFAULT_MIN_DOT_NET_THREAD_POOL_SIZE = 200; | ||
} | ||
|
||
public class ThreadPoolOptionsFormatter : IOptionFormatter<ThreadPoolOptions> | ||
{ | ||
public string Category { get; } | ||
|
||
public string Name => nameof(ThreadPoolOptions); | ||
|
||
private ThreadPoolOptions options; | ||
public ThreadPoolOptionsFormatter(IOptions<ThreadPoolOptions> options) | ||
{ | ||
this.options = options.Value; | ||
} | ||
|
||
public IEnumerable<string> Format() | ||
{ | ||
return new List<string>() | ||
{ | ||
OptionFormattingUtilities.Format(nameof(options.MinDotNetThreadPoolSize),options.MinDotNetThreadPoolSize), | ||
}; | ||
} | ||
} | ||
} |
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.