From 50940e5004ead84140642da047b996b14a2a6907 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Fri, 26 Apr 2024 22:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=A6=82=E6=98=AF0.1.6=E5=AE=8C?= =?UTF-8?q?=E5=85=A8=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- miner/src/cacluate.rs | 18 +++++++++++++++--- wgpu-mine/Cargo.toml | 6 +++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/miner/src/cacluate.rs b/miner/src/cacluate.rs index 14659c5..910c517 100644 --- a/miner/src/cacluate.rs +++ b/miner/src/cacluate.rs @@ -57,7 +57,7 @@ pub struct CacluateConfig { #[inline(always)] pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) { // 初始猜测的时间间隔 - let mut report_interval = 10000; // 第一次猜测测 1w 次, 获取初始数据 + let mut report_interval = 100000; // 第一次猜测测 10w 次, 获取初始数据 let mut run_speed = 0.0; let mut start_time = std::time::Instant::now(); let mut k: u64 = 0; @@ -115,12 +115,14 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) { // 虚评 namer.update_skill(); - // let xu = crate::evaluate::xuping::XuPing1_3_1::evaluate(&namer); let xu = crate::evaluate::xuping::XuPing2_0_1015::evaluate(&namer); if xu < config.qp_expect as f64 { continue; } + + let xu_qd = crate::evaluate::xuping::XuPing2_0_1015_QD::evaluate(&namer); + // debug!("Id:{:>15}|{:>5}|{}|{}", i, full_name, xu, show_name(&namer)); // let skill_sum: u32 = { @@ -142,12 +144,22 @@ pub fn cacl(config: CacluateConfig, id: u64, outfile: &PathBuf) { get_count += 1; info!("Id:{:>15}|{}|{}|{}", i, full_name, xu, namer.get_info()); + + let write_in = format!( + // ,,, + "{},{},{},{}\n", + full_name, + xu, + xu_qd, + namer.get_info() + ); + // 写入 (写到最后一行) match std::fs::OpenOptions::new() .append(true) .create(true) .open(outfile) - .and_then(|mut file| file.write(format!("{}\n", full_name).as_bytes())) + .and_then(|mut file| file.write(write_in.as_bytes())) { Ok(_) => {} Err(e) => { diff --git a/wgpu-mine/Cargo.toml b/wgpu-mine/Cargo.toml index ac03d0d..99f4915 100644 --- a/wgpu-mine/Cargo.toml +++ b/wgpu-mine/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" bytemuck = "1.15.0" flume = "0.11.0" pollster = "0.3.0" -serde = { version = "1.0.197", features = ["serde_derive"] } -serde_json = "1.0.115" +serde = { version = "1.0", features = ["serde_derive"] } +serde_json = "1.0" tracing = "0.1.40" tracing-subscriber = "0.3.18" -wgpu = "0.19.3" +wgpu = "0.19.4"