Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base
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
Dhina17
platform_frameworks_base
Commits
8e958350
Commit
8e958350
authored
5 years ago
by
Kweku Adams
Committed by
Android (Google) Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Adding proto for QuotaTracker dumps."
parents
d66b2950
8a74765b
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
core/proto/android/util/quotatracker.proto
+219
-0
219 additions, 0 deletions
core/proto/android/util/quotatracker.proto
with
219 additions
and
0 deletions
core/proto/android/util/quotatracker.proto
0 → 100644
+
219
−
0
View file @
8e958350
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax
=
"proto2"
;
package
android
.
util.quota
;
option
java_multiple_files
=
true
;
import
"frameworks/base/core/proto/android/privacy.proto"
;
// A com.android.util.quota.QuotaTracker object.
message
QuotaTrackerProto
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
bool
is_enabled
=
1
;
// If quota is free for everything in the tracker.
optional
bool
is_global_quota_free
=
2
;
// Current elapsed realtime.
optional
int64
elapsed_realtime
=
3
;
message
AlarmListener
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// Whether the listener is waiting for an alarm or not.
optional
bool
is_waiting
=
1
;
// The time at which the alarm should go off, in the elapsed realtime timebase. Only
// valid if is_waiting is true.
optional
int64
trigger_time_elapsed
=
2
;
}
// Next tag: 4
}
// A com.android.util.quota.Category object.
message
CategoryProto
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// Name of the category set by the system service.
optional
string
name
=
1
;
}
// A com.android.util.quota.Uptc object.
message
UptcProto
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// UserHandle value. Should be 0, 10, 11, 12, etc. where 0 is the owner.
optional
int32
user_id
=
1
;
// Package name
optional
string
name
=
2
;
// Tag set by the system service to differentiate calls.
optional
string
tag
=
3
;
}
// A com.android.util.quota.CountQuotaTracker object.
message
CountQuotaTrackerProto
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
QuotaTrackerProto
base_quota_data
=
1
;
message
CountLimit
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
CategoryProto
category
=
1
;
optional
int32
limit
=
2
;
optional
int64
window_size_ms
=
3
;
}
repeated
CountLimit
count_limit
=
2
;
message
Event
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// The time the event occurred, in the elapsed realtime timebase.
optional
int64
timestamp_elapsed
=
1
;
}
message
ExecutionStats
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// The time after which this record should be considered invalid (out of date), in the
// elapsed realtime timebase.
optional
int64
expiration_time_elapsed
=
1
;
optional
int64
window_size_ms
=
2
;
optional
int32
count_limit
=
3
;
// The total number of events that occurred in the window.
optional
int32
count_in_window
=
4
;
// The time after which the app will be under the bucket quota. This is only valid if
// count_in_window >= count_limit.
optional
int64
in_quota_time_elapsed
=
5
;
}
message
UptcStats
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
UptcProto
uptc
=
1
;
// True if the UPTC has been given free quota.
optional
bool
is_quota_free
=
2
;
repeated
Event
events
=
3
;
repeated
ExecutionStats
execution_stats
=
4
;
optional
QuotaTrackerProto.AlarmListener
in_quota_alarm_listener
=
5
;
}
repeated
UptcStats
uptc_stats
=
3
;
// Next tag: 4
}
// A com.android.util.quota.DurationQuotaTracker object.
message
DurationQuotaTrackerProto
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
QuotaTrackerProto
base_quota_data
=
1
;
message
DurationLimit
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
CategoryProto
category
=
1
;
optional
int64
limit_ms
=
2
;
optional
int64
window_size_ms
=
3
;
}
repeated
DurationLimit
duration_limit
=
2
;
message
ExecutionStats
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// The time after which this record should be considered invalid (out of date), in the
// elapsed realtime timebase.
optional
int64
expiration_time_elapsed
=
1
;
optional
int32
window_size_ms
=
2
;
optional
int64
duration_limit_ms
=
3
;
// The overall session duration in the window.
optional
int64
session_duration_in_window_ms
=
4
;
// The number of individual long-running events in the window.
optional
int32
event_count_in_window
=
5
;
// The time after which the app will be under the bucket quota. This is only valid if
// session_duration_in_window_ms >= duration_limit_ms.
optional
int64
in_quota_time_elapsed
=
6
;
}
message
Timer
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
// True if the Timer is actively tracking long-running events.
optional
bool
is_active
=
1
;
// The time this timer last became active. Only valid if is_active is true.
optional
int64
start_time_elapsed
=
2
;
// How many long-running events are currently running. Valid only if is_active is true.
optional
int32
event_count
=
3
;
}
message
TimingSession
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
int64
start_time_elapsed
=
1
;
optional
int64
end_time_elapsed
=
2
;
// How many events started during this session. This only count long-running events, not
// instantaneous events.
optional
int32
event_count
=
3
;
}
message
UptcStats
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
UptcProto
uptc
=
1
;
// True if the UPTC has been given free quota.
optional
bool
is_quota_free
=
2
;
optional
Timer
timer
=
3
;
repeated
TimingSession
saved_sessions
=
4
;
repeated
ExecutionStats
execution_stats
=
5
;
optional
QuotaTrackerProto.AlarmListener
in_quota_alarm_listener
=
6
;
}
repeated
UptcStats
uptc_stats
=
3
;
message
ReachedQuotaAlarmListener
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
int64
trigger_time_elapsed
=
1
;
message
UptcTimes
{
option
(
.
android.msg_privacy
)
.
dest
=
DEST_AUTOMATIC
;
optional
UptcProto
uptc
=
1
;
optional
int64
out_of_quota_time_elapsed
=
2
;
}
repeated
UptcTimes
uptc_times
=
2
;
}
optional
ReachedQuotaAlarmListener
reached_quota_alarm_listener
=
4
;
// Next tag: 5
}
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