Add session metric pruning.
[ Merge of http://go/wvgerrit/65983 ] Add support to drop closed metrics in order to save space for long-running applications (and CdmEngine instances). The code now keeps only a limited number of metrics collections after the session is closed. As a session (and its metrics session) is closed, the oldest, closed metrics session is dropped. This means those metrics will not be reported nor accessible in the client. Bug: http://b/118664842 Test: CDM Unit tests. Android Unit Test. Ran GPLay Manually. Change-Id: I27d6e61a8fe4148ad1ef2a433c8e5f4cdd84cc72
This commit is contained in:
@@ -194,6 +194,7 @@ CdmResponseType CdmEngine::CloseSession(const CdmSessionId& session_id) {
|
||||
LOGE("CdmEngine::CloseSession: session not found = %s", session_id.c_str());
|
||||
return SESSION_NOT_FOUND_1;
|
||||
}
|
||||
metrics_.ConsolidateSessions();
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user