mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
fix: compiler errors under pprof and mem-prof features (#2537)
* fix: compiler errors under pprof feature * fix: compiler errors under mem-prof feature
This commit is contained in:
@@ -278,8 +278,7 @@ pub enum Error {
|
||||
#[snafu(display("Failed to dump profile data"))]
|
||||
DumpProfileData {
|
||||
location: Location,
|
||||
#[snafu(source)]
|
||||
error: common_mem_prof::error::Error,
|
||||
source: common_mem_prof::error::Error,
|
||||
},
|
||||
|
||||
#[snafu(display("Invalid prepare statement: {}", err_msg))]
|
||||
@@ -335,7 +334,9 @@ pub enum Error {
|
||||
|
||||
#[cfg(feature = "pprof")]
|
||||
#[snafu(display("Failed to dump pprof data"))]
|
||||
DumpPprof { source: common_pprof::Error },
|
||||
DumpPprof {
|
||||
source: crate::http::pprof::nix::Error,
|
||||
},
|
||||
|
||||
#[snafu(display(""))]
|
||||
Metrics { source: BoxedError },
|
||||
|
||||
@@ -19,7 +19,7 @@ pub mod influxdb;
|
||||
pub mod mem_prof;
|
||||
pub mod opentsdb;
|
||||
pub mod otlp;
|
||||
mod pprof;
|
||||
pub mod pprof;
|
||||
pub mod prom_store;
|
||||
pub mod prometheus;
|
||||
pub mod script;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#[cfg(feature = "pprof")]
|
||||
mod nix;
|
||||
pub(crate) mod nix;
|
||||
|
||||
#[cfg(feature = "pprof")]
|
||||
pub mod handler {
|
||||
|
||||
@@ -17,32 +17,38 @@ use std::time::Duration;
|
||||
|
||||
use common_error::ext::ErrorExt;
|
||||
use common_error::status_code::StatusCode;
|
||||
use common_macro::stack_trace_debug;
|
||||
use prost::Message;
|
||||
use snafu::{Location, ResultExt, Snafu};
|
||||
|
||||
#[derive(Debug, Snafu)]
|
||||
#[derive(Snafu)]
|
||||
#[stack_trace_debug]
|
||||
pub enum Error {
|
||||
#[snafu(display("Failed to create profiler guard"))]
|
||||
CreateGuard {
|
||||
source: pprof::Error,
|
||||
#[snafu(source)]
|
||||
error: pprof::Error,
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(display("Failed to create report"))]
|
||||
CreateReport {
|
||||
source: pprof::Error,
|
||||
#[snafu(source)]
|
||||
error: pprof::Error,
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(display("Failed to create flamegraph"))]
|
||||
CreateFlamegraph {
|
||||
source: pprof::Error,
|
||||
#[snafu(source)]
|
||||
error: pprof::Error,
|
||||
location: Location,
|
||||
},
|
||||
|
||||
#[snafu(display("Failed to create pprof report"))]
|
||||
ReportPprof {
|
||||
source: pprof::Error,
|
||||
#[snafu(source)]
|
||||
error: pprof::Error,
|
||||
location: Location,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user