mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-27 22:45:57 +00:00
Remove evaluate telemetry due to redundancy (#4996)
* Remove evaluate start / stop from telemetry * Remove eval telemetry * remove check for evaluate time delay * add comment * remove const Co-authored-by: Ryan Lai <ryalai96@gamil.com>
This commit is contained in:
parent
a47cae031f
commit
c6a3620ba8
3 changed files with 8 additions and 26 deletions
|
|
@ -127,10 +127,7 @@ void WindowsTelemetry::LogEvaluationStop() const {
|
|||
return;
|
||||
|
||||
TraceLoggingWrite(telemetry_provider_handle,
|
||||
"EvaluationStop",
|
||||
TraceLoggingBool(true, "UTCReplace_AppSessionGuid"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
"EvaluationStop");
|
||||
}
|
||||
|
||||
void WindowsTelemetry::LogEvaluationStart() const {
|
||||
|
|
@ -138,10 +135,7 @@ void WindowsTelemetry::LogEvaluationStart() const {
|
|||
return;
|
||||
|
||||
TraceLoggingWrite(telemetry_provider_handle,
|
||||
"EvaluationStart",
|
||||
TraceLoggingBool(true, "UTCReplace_AppSessionGuid"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
"EvaluationStart");
|
||||
}
|
||||
|
||||
void WindowsTelemetry::LogSessionCreation(uint32_t session_id, int64_t ir_version, const std::string& model_producer_name,
|
||||
|
|
|
|||
|
|
@ -1297,14 +1297,8 @@ Status InferenceSession::Run(const RunOptions& run_options,
|
|||
return Status(common::ONNXRUNTIME, common::FAIL, "Session not initialized.");
|
||||
}
|
||||
|
||||
// check the frequency to send Evalutaion Stop event
|
||||
if (TimeDiffMicroSeconds(telemetry_.time_sent_last_evalutation_start_) >
|
||||
telemetry_.kDurationBetweenSendingEvaluationStart) {
|
||||
env.GetTelemetryProvider().LogEvaluationStart();
|
||||
// reset counters
|
||||
telemetry_.time_sent_last_evalutation_start_ = std::chrono::high_resolution_clock::now();
|
||||
telemetry_.isEvaluationStart = true;
|
||||
}
|
||||
// log evaluation start to trace logging provider
|
||||
env.GetTelemetryProvider().LogEvaluationStart();
|
||||
|
||||
ORT_RETURN_IF_ERROR_SESSIONID_(ValidateInputs(feed_names, feeds));
|
||||
ORT_RETURN_IF_ERROR_SESSIONID_(ValidateOutputs(output_names, p_fetches));
|
||||
|
|
@ -1393,11 +1387,9 @@ Status InferenceSession::Run(const RunOptions& run_options,
|
|||
telemetry_.total_run_duration_since_last_ = 0;
|
||||
}
|
||||
|
||||
// check the frequency to send Evalutaion Stop event
|
||||
if (telemetry_.isEvaluationStart) {
|
||||
env.GetTelemetryProvider().LogEvaluationStop();
|
||||
telemetry_.isEvaluationStart = false;
|
||||
}
|
||||
// log evaluation stop to trace logging provider
|
||||
env.GetTelemetryProvider().LogEvaluationStop();
|
||||
|
||||
// send out profiling events (optional)
|
||||
if (session_profiler_.IsEnabled()) {
|
||||
session_profiler_.EndTimeAndRecordEvent(profiling::SESSION_EVENT, "model_run", tp);
|
||||
|
|
|
|||
|
|
@ -592,18 +592,14 @@ class InferenceSession {
|
|||
uint32_t session_id_; // the current session's id
|
||||
|
||||
struct Telemetry {
|
||||
Telemetry() : time_sent_last_(), time_sent_last_evalutation_start_() {}
|
||||
Telemetry() : time_sent_last_() {}
|
||||
uint32_t total_runs_since_last_ = 0; // the total number of Run() calls since the last report
|
||||
long long total_run_duration_since_last_ = 0; // the total duration (us) of Run() calls since the last report
|
||||
std::string event_name_; // where the model is loaded from: ["model_loading_uri", "model_loading_proto", "model_loading_istream"]
|
||||
|
||||
TimePoint time_sent_last_; // the TimePoint of the last report
|
||||
TimePoint time_sent_last_evalutation_start_;
|
||||
// Event Rate per provider < 20 peak events per second
|
||||
constexpr static long long kDurationBetweenSending = 1000 * 1000 * 60 * 10; // duration in (us). send a report every 10 mins
|
||||
constexpr static long long kDurationBetweenSendingEvaluationStart = 1000 * 50; // duration in (us). send a EvaluationStop Event every 50 ms;
|
||||
|
||||
bool isEvaluationStart = false;
|
||||
} telemetry_;
|
||||
|
||||
#ifdef ONNXRUNTIME_ENABLE_INSTRUMENT
|
||||
|
|
|
|||
Loading…
Reference in a new issue