-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server/status_server: Add
dump_prof
and dump_prof_to_resp
functions
1. Modify entry for profile from `/jeprof` to `/pprof/profile` 2. Abstract the dumping process to two functions. Maybe `dump_prof` function can be added to `tikv_alloc` crates ( but a global timer is needed ) Signed-off-by: Yang Keao <keao.yang@yahoo.com>
- Loading branch information
Showing
3 changed files
with
95 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
#[derive(Debug)] | ||
pub enum ProfError { | ||
MemProfilingNotEnabled, | ||
IOError(std::io::Error), | ||
JemallocNotEnabled, | ||
JemallocError(i32), | ||
} | ||
|
||
pub type ProfResult<T> = std::result::Result<T, ProfError>; | ||
|
||
impl From<std::io::Error> for ProfError { | ||
fn from(e: std::io::Error) -> Self { | ||
ProfError::IOError(e) | ||
} | ||
} |
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