From 031cf92e0a81df2c8ea687820df8b43b57e99e2e Mon Sep 17 00:00:00 2001 From: Yuhao Su Date: Mon, 18 Sep 2023 15:04:26 +0800 Subject: [PATCH] fix comment --- src/common/src/config.rs | 4 ---- src/common/src/heap_profiling/mod.rs | 4 ++-- src/compute/src/lib.rs | 2 +- src/compute/src/rpc/service/monitor_service.rs | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/common/src/config.rs b/src/common/src/config.rs index 3730df73e1ee8..2924b5dcdbf6b 100644 --- a/src/common/src/config.rs +++ b/src/common/src/config.rs @@ -924,10 +924,6 @@ pub mod default { pub fn telemetry_enabled() -> bool { true } - - pub fn manually_dump_heap_profile_dir() -> String { - "".to_string() - } } pub mod storage { diff --git a/src/common/src/heap_profiling/mod.rs b/src/common/src/heap_profiling/mod.rs index 176d2b2af2d1d..7ab270bdecca7 100644 --- a/src/common/src/heap_profiling/mod.rs +++ b/src/common/src/heap_profiling/mod.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub const MANUALLY_DUMP_MID_NAME: &str = "manually-dump.compute.dump"; -pub const AUTO_DUMP_MID_NAME: &str = "auto-dump.compute.dump"; +pub const MANUALLY_DUMP_MID_NAME: &str = "manually-dump.compute.heap"; +pub const AUTO_DUMP_MID_NAME: &str = "auto-dump.compute.heap"; pub const COLLAPSED_SUFFIX: &str = "collapsed"; pub mod jeprof; diff --git a/src/compute/src/lib.rs b/src/compute/src/lib.rs index db79077bcf98c..ba53ebb2d3aef 100644 --- a/src/compute/src/lib.rs +++ b/src/compute/src/lib.rs @@ -125,7 +125,7 @@ pub struct ComputeNodeOpts { /// Enable heap profile dump when memory usage is high. #[clap(long, env = "RW_HEAP_PROFILING_DIR")] #[override_opts(path = server.heap_profiling.dir)] - pub heap_profiling: Option, + pub heap_profiling_dir: Option, #[clap(long, env = "RW_OBJECT_STORE_STREAMING_READ_TIMEOUT_MS", value_enum)] #[override_opts(path = storage.object_store_streaming_read_timeout_ms)] diff --git a/src/compute/src/rpc/service/monitor_service.rs b/src/compute/src/rpc/service/monitor_service.rs index 5ff9efbf7f742..02b89f5bdf4bf 100644 --- a/src/compute/src/rpc/service/monitor_service.rs +++ b/src/compute/src/rpc/service/monitor_service.rs @@ -140,7 +140,7 @@ impl MonitorService for MonitorServiceImpl { } let time_prefix = chrono::Local::now().format("%Y-%m-%d-%H-%M-%S").to_string(); - let file_name = format!("{}.{}\0", time_prefix, AUTO_DUMP_MID_NAME); + let file_name = format!("{}.{}\0", time_prefix, MANUALLY_DUMP_MID_NAME); let arg_dir = request.into_inner().get_dir().clone(); let dir = PathBuf::from(if arg_dir.is_empty() { &self.server_config.heap_profiling.dir