miner timing resolution (#351)

This commit is contained in:
Yeastplume 2017-11-20 22:57:36 +00:00 committed by GitHub
parent 2f09d2e630
commit c019cc2fd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -150,7 +150,7 @@ burn_reward = false
#slower. #slower.
[[mining.cuckoo_miner_plugin_config]] [[mining.cuckoo_miner_plugin_config]]
type_filter = "mean_compat_cpu" type_filter = "mean_compat_cpu"
parameter_list = {NUM_THREADS=4, NUM_TRIMS=68} parameter_list = {NUM_THREADS=1, NUM_TRIMS=68}
#note lean_cpu currently has a bug which prevents it from #note lean_cpu currently has a bug which prevents it from
#working with threads > 1 #working with threads > 1

View file

@ -207,7 +207,7 @@ impl Miner {
let stats = job_handle.get_stats(i); let stats = job_handle.get_stats(i);
if let Ok(stat_vec) = stats { if let Ok(stat_vec) = stats {
for s in stat_vec { for s in stat_vec {
let last_solution_time_secs = s.last_solution_time as f64 / 1000.0; let last_solution_time_secs = s.last_solution_time as f64 / 1000000000.0;
let last_hashes_per_sec = 1.0 / last_solution_time_secs; let last_hashes_per_sec = 1.0 / last_solution_time_secs;
debug!( debug!(
LOGGER, LOGGER,
@ -299,7 +299,7 @@ impl Miner {
if time::get_time().sec >= next_stat_check { if time::get_time().sec >= next_stat_check {
let stats_vec = plugin_miner.get_stats(0).unwrap(); let stats_vec = plugin_miner.get_stats(0).unwrap();
for s in stats_vec.into_iter() { for s in stats_vec.into_iter() {
let last_solution_time_secs = s.last_solution_time as f64 / 1000.0; let last_solution_time_secs = s.last_solution_time as f64 / 1000000000.0;
let last_hashes_per_sec = 1.0 / last_solution_time_secs; let last_hashes_per_sec = 1.0 / last_solution_time_secs;
debug!( debug!(
LOGGER, LOGGER,

View file

@ -18,7 +18,7 @@ grin_util = { path = "../util" }
[dependencies.cuckoo_miner] [dependencies.cuckoo_miner]
git = "https://github.com/mimblewimble/cuckoo-miner" git = "https://github.com/mimblewimble/cuckoo-miner"
tag="grin_integration_15" tag="grin_integration_16"
#path = "../../cuckoo-miner" #path = "../../cuckoo-miner"
#uncomment this feature to turn off plugin builds #uncomment this feature to turn off plugin builds
#features=["no-plugin-build"] #features=["no-plugin-build"]