Expand description
Various utilities used by farmer or with farmer
Modules§
- ss58
- Modified version of SS58 parser extracted from Substrate in order to not pull the whole
sp-core
into farmer application
Structs§
- Async
Join OnDrop - Joins async join handle on drop
- CpuCore
Set - Abstraction for CPU core set
Functions§
- all_
cpu_ cores - Get all cpu cores, grouped into sets according to NUMA nodes or L3 cache groups on large CPUs.
- create_
plotting_ thread_ pool_ manager - Create thread pools manager.
- parse_
cpu_ cores_ sets - Parse space-separated set of groups of CPU cores (individual cores are coma-separated) into vector of CPU core sets that can be used for creation of plotting/replotting thread pools.
- rayon_
custom_ spawn_ handler - This function is supposed to be used with [
rayon::ThreadPoolBuilder::spawn_handler()
] to spawn handler with a custom logic defined byspawn_hook_builder
. - recommended_
number_ of_ farming_ threads - Recommended number of thread pool size for farming, equal to number of CPU cores in the first NUMA node
- run_
future_ in_ dedicated_ thread - Runs future on a dedicated thread with the specified name, will block on drop until background thread with future is stopped too, ensuring nothing is left in memory
- thread_
pool_ core_ indices - Thread indices for each thread pool
- tokio_
rayon_ spawn_ handler - This function is supposed to be used with [
rayon::ThreadPoolBuilder::spawn_handler()
] to inherit current tokio runtime.