Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
8fa69605
Commit
8fa69605
authored
1 year ago
by
Amith Yamasani
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Log authenticator service call latencies" into main
parents
e5d9a03c
9c8ebe8c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/core/java/com/android/server/accounts/AccountManagerService.java
+15
-1
15 additions, 1 deletion
...va/com/android/server/accounts/AccountManagerService.java
with
15 additions
and
1 deletion
services/core/java/com/android/server/accounts/AccountManagerService.java
+
15
−
1
View file @
8fa69605
...
...
@@ -113,6 +113,7 @@ import com.android.internal.util.ArrayUtils;
import
com.android.internal.util.DumpUtils
;
import
com.android.internal.util.IndentingPrintWriter
;
import
com.android.internal.util.Preconditions
;
import
com.android.modules.expresslog.Histogram
;
import
com.android.server.LocalServices
;
import
com.android.server.ServiceThread
;
import
com.android.server.SystemService
;
...
...
@@ -284,6 +285,11 @@ public class AccountManagerService
private
static
AtomicReference
<
AccountManagerService
>
sThis
=
new
AtomicReference
<>();
private
static
final
Account
[]
EMPTY_ACCOUNT_ARRAY
=
new
Account
[]{};
private
static
Histogram
sResponseLatency
=
new
Histogram
(
"app.value_high_authenticator_response_latency"
,
new
Histogram
.
ScaledRangeOptions
(
20
,
10000
,
10000
,
1.5f
)
);
/**
* This should only be called by system code. One should only call this after the service
* has started.
...
...
@@ -4937,6 +4943,9 @@ public class AccountManagerService
protected
boolean
mCanStartAccountManagerActivity
=
false
;
protected
final
UserAccounts
mAccounts
;
private
int
mAuthenticatorUid
;
private
long
mBindingStartTime
;
public
Session
(
UserAccounts
accounts
,
IAccountManagerResponse
response
,
String
accountType
,
boolean
expectActivityLaunch
,
boolean
stripAuthTokenFromResult
,
String
accountName
,
boolean
authDetailsRequired
)
{
...
...
@@ -4974,6 +4983,10 @@ public class AccountManagerService
}
IAccountManagerResponse
getResponseAndClose
()
{
if
(
mAuthenticatorUid
!=
0
&&
mBindingStartTime
>
0
)
{
sResponseLatency
.
logSampleWithUid
(
mAuthenticatorUid
,
SystemClock
.
uptimeMillis
()
-
mBindingStartTime
);
}
if
(
mResponse
==
null
)
{
close
();
return
null
;
...
...
@@ -5353,7 +5366,8 @@ public class AccountManagerService
mContext
.
unbindService
(
this
);
return
false
;
}
mAuthenticatorUid
=
authenticatorInfo
.
uid
;
mBindingStartTime
=
SystemClock
.
uptimeMillis
();
return
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment