Status Update
Comments
da...@google.com <da...@google.com> #2
I am not sure I understand the use case. how can the benchmark be code to real world scenario when it's not possible to do right now ? which scenario is it ?
In any case, since this would be for benchmarking, this would clearly not be available through the public DSL. We should find a semi-private way of doing this (maybe the private variant API object could offer that functionality for instance or a property).
xi...@google.com <xi...@google.com> #3
We want benchmarks to measure code after Progaurd / R8, but it's not possible to turn that on for androidTests in library modules at the moment (to my knowledge?)
Benchmarks are also a public facing thing, but we have a plugin to help configure gradle builds for our users, so if support for this ends up in a private API, we could try to keep those usages localized to our code perhaps.
da...@google.com <da...@google.com> #4
Any update on the status of this request and when it can be supported?
Thanks,
Amanda
na...@gmail.com <na...@gmail.com> #5
this is not part of our OKR at this point so we are not talking soon. at first glance, we would need to simulate usage patterns to minify against and such, this seems substantial amount of work. there are not a lot of library module that have android tests, most only rely on unit-tests.
how important is this ? we are out of PM right now but I suspect the next step will be to negotiate with J. Eason and xav@ to scale a priority level.
na...@gmail.com <na...@gmail.com> #6
This is a high priority request for Compose, to enable their benchmarks to measure release accurate performance. (Micro) Benchmarks are library modules, as they don't need the complexity of multi-apk tests - they're self measuring APKs that depend on libraries. (d.android.com/benchmark)
there are not a lot of library module that have android tests, most only rely on unit-tests.
To clarify, this is for com.android.library
modules, not jars - I'd expect most of those to use android tests (all of the libraries in jetpack for example do).
we would need to simulate usage patterns to minify against and such, this seems substantial amount of work
Simulate usage patterns? I don't understand - the dev can themselves provide a keep rule for test infra / classes if necessary. Long term, keep rules should be provided by test libraries.
na...@gmail.com <na...@gmail.com> #7
We've been experimenting with ways to work around this for Compose. Performance results from R8 seem significantly different, and would enable us to measure much more accurately. I've tried to come up with a workaround using a com.android.app module, and while it almost works (and we can get measurements), it's extremely hacky and doesn't let us run tests anymore via Studio:
na...@gmail.com <na...@gmail.com> #8
Bumping this request, as Compose has recently had more interest in the ability to benchmark with and without R8 enabled.
We're fine if the default implementation doesn't work with minification (tree shaking) - we're happy to supply those rules ourselves, or simply evaluating with minification off to take advantage of other optimizations.
na...@gmail.com <na...@gmail.com> #9
Juan, this might be something to put on our OKR in the near future, I think you chat with Amanda to set the priority.
na...@gmail.com <na...@gmail.com> #10
Hey everyone, I am catching up on feature requests and saw this one. I'll schedule time for us to talk about this in a few days.
xi...@google.com <xi...@google.com> #11
Ivan, can you provide a rough estimate on how long this would take ?
sh...@gmail.com <sh...@gmail.com> #12
I think this is a duplicate of
My understanding of this feature request is the following:
- As a library author, I'd like to write microbenchmarks in my library subproject that measure performance of my library after it's been processed by R8 [1]
Chris/Dustin, is this correct? If [1] is correct, this is a duplicate of a duplicate of
ka...@gmail.com <ka...@gmail.com> #13
As a small correction, it's:
- As a user of microbenchmarks, I'd like to measure performance of code processed by R8
For a bit more context, we generally recommend library and app devs create a completely new, empty library module to add microbenchmarks to, e.g. mylib/src/androidTest/
.
For this reason, we don't particularly care about the minified main library component from the same module.
This librarytest-only focus does have the downside that app devs must pull code into a library to be microbenchmarks, and maybe that could be something improved if there was a good minification story across the test and app module boundary, but that's a separate (but related) concern for the future.
For right now, we care about libraries with empty main directories running R8 on the code in androidTest and its dependencies.
Description
androidx.core.uwb:uwb
Version used:
1.0.0-alpha02
Devices/Android versions reproduced on:
Pixel 6 Pro Android 12 5th July security update
We are starting UWB ranging, but not seeing any callbacks (with the same problem using Estimote UWB and Qorvo DWM3000EVB).
Does UWB ranging work on the Pixel 6 Pro running Android 12 or do we need Android 13 Beta 4?
This is logcat filtering on any UWB message:
2022-07-14 12:00:02.292 2552-5613/? I/NearbyUWB: Analytics is enabled for package uwb.client.3p [CONTEXT service_id=49 ]
2022-07-14 12:00:02.296 2552-5613/? I/NearbyUWB: Client 202602820 with package name
2022-07-14 12:00:06.612 2552-26939/? I/NearbyUWB: Local UWB address is 0X29EE [CONTEXT service_id=49 ]
2022-07-14 12:00:06.623 27673-27719/
2022-07-14 12:00:06.715 27673-27673/
2022-07-14 12:00:06.716 27673-27673/
2022-07-14 12:00:54.361 2552-6072/? I/NearbyUWB: Analytics is enabled for package uwb.client.3p [CONTEXT service_id=49 ]
2022-07-14 12:00:54.365 2552-6072/? I/NearbyUWB: Client 17652864 with package name
2022-07-14 12:00:56.583 2552-26452/? I/NearbyUWB: Local UWB address is 0XD826 [CONTEXT service_id=49 ]
2022-07-14 12:00:56.596 27910-27951/
2022-07-14 12:00:56.716 27910-27910/
2022-07-14 12:00:59.010 27910-27910/
2022-07-14 12:00:59.012 27910-27951/
2022-07-14 12:00:59.021 2552-26939/? I/NearbyUWB: UWB Ranging Device start ranging [CONTEXT service_id=49 ]
2022-07-14 12:00:59.022 2552-26939/? I/NearbyUWB: Local UWB address is 0XD826 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: Opens UWB session with bundle parameters: [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: aoa_result_request, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: range_data_ntf_proximity_near, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: is_tx_adaptive_payload_power_enabled, value: false [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: rframe_config, value: 3 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: max_ranging_round_retries, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: psdu_data_rate, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: fcs_type, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: device_role, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: device_type, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: block_stride_length, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: prf_mode, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: slot_duration_rstu, value: 2400 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.023 2552-26939/? I/NearbyUWB: UWB parameter: protocol_version, value: 1.1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: slots_per_ranging_round, value: 6 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: vendor_id, value: [76, 0] [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: ranging_interval_ms, value: 240 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: dest_address_list, value: [3176445112179752960] [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: sfd_id, value: 2 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: num_of_msrmt_focus_on_range, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: channel_number, value: 9 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: session_priority, value: 50 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: is_key_rotation_enabled, value: false [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: sts_config, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: num_of_msrmt_focus_on_aoa_elevation, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: in_band_termination_attempt_count, value: 3 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: range_data_ntf_proximity_far, value: 20000 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: bprf_phr_data_rate, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: sts_length, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.024 2552-26939/? I/NearbyUWB: UWB parameter: initiation_time_ms, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: aoa_type, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: has_time_of_flight_report, value: true [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: has_angle_of_arrival_figure_of_merit_report, value: false [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: has_angle_of_arrival_azimuth_report, value: false [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: mac_address_mode, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: preamble_duration, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: key_rotation_rate, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: bundle_version, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: has_angle_of_arrival_elevation_report, value: false [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: static_sts_iv, value: [-55, -32, -13, 82, -3, 53] [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: range_data_ntf_config, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: ranging_round_usage, value: 2 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: protocol_name, value: fira [CONTEXT service_id=49 ]
2022-07-14 12:00:59.025 2552-26939/? I/NearbyUWB: UWB parameter: has_result_report_phase, value: true [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: device_address, value: -2871607712402112512 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: measurement_report_type, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: preamble_code_index, value: 11 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: session_id, value: 35684 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: multi_node_mode, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: num_of_msrmt_focus_on_aoa_azimuth, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: hopping_mode, value: 0 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: UWB parameter: sts_segment_count, value: 1 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.026 2552-26939/? I/NearbyUWB: exec UWB operation Open session [CONTEXT service_id=49 ]
2022-07-14 12:00:59.031 3400-3443/? V/UwbService: DefaultSessionManager: Opening fira ranging
2022-07-14 12:00:59.035 787-787/? I/qorvo.uwb.FiraController: initNewTwrSession:FiraTwrSession{id: 35684, deviceType: CONTROLEE, deviceRole: RESPONDER, rangingRoundUsage: DS_TWR, multiNodeMode: UNICAST, deviceAddress: UwbAddress{address: [216, 38]}, destAddressList: [UwbAddress{address: [44, 21]}], initiationTimeMs: 0, slotDurationRstu: 2400, slotsPerRangingRound: 6, rangingBlockDurationMs: 240, blockStridingValue: 0, maxRangingRoundRetries: 0, isHoppingEnabled: false, isBlockStridingEnabled: false, sessionPriority: 50, rangingRoundControl: RangingRoundControl{hasResultReportPhase: true, measurementReportType: INITIATOR_TO_RESPONDER, hasDeferredMode: true}, inBandTerminationAttemptCount: 3, channelNumber: 9, preambleCodeIndex: 11, rframeConfig: SP3, prfMode: BPRF, preambleDuration: T64_SYMBOLS, sfdId: 2, stsSegmentCount: 1, psduDataRate: RATE_6M81, bprfPhrDataRate: RATE_850K, fcsType: CRC_16, isTxAdaptivePayloadPowerEnabled: false, aoaType: AZIMUTH, stsConfig: STATIC, subSessionId: 0, vendorId: [76, 0], staticStsIV: [201, 224, 243, 82, 253, 53], isKeyRotationEnabled: false, keyRotationRate: 0, aoaResultRequest: REQ_AOA_RESULTS, resultReportConfig: ResultReportConfig{hasTimeOfFlightReport: true, hasAngleOfArrivalAzimuthReport: false, hasAngleOfArrivalElevationReport: false, hasAngleOfArrivalFigureOfMeritReport: false}}
2022-07-14 12:00:59.035 787-787/? I/qorvo.uwb.FiraController: CheckTwrSessionFields
2022-07-14 12:00:59.035 787-787/? I/qorvo.uwb.IeeeUtils: GetPhyInfo
2022-07-14 12:00:59.036 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitResponse
2022-07-14 12:00:59.036 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitResponse: Read message
2022-07-14 12:00:59.036 787-787/? I/qorvo.uwb.IeeeUtils: SetChannel: Set channel to 9
2022-07-14 12:00:59.036 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitAck: Received ACK
2022-07-14 12:00:59.036 787-787/? I/qorvo.uwb.UwbIface: OnPreSessionOpen fira
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.McpsUtils: SetRegion
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitAck: Received ACK
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: InitSession
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: CreateSessionStateMsg
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitAck: Received ACK
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: ConfigTwrSession
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutMainSessionParams
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutTimingsParams
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutBehaviorParams
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutRadioParams
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutAntennaParams
2022-07-14 12:00:59.037 787-787/? I/qorvo.uwb.FiraRegionUtils: PutCryptoParams
2022-07-14 12:00:59.038 787-787/? I/qorvo.uwb.FiraRegionUtils: PutReportParams
2022-07-14 12:00:59.038 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitAck: Received ACK
2022-07-14 12:00:59.038 787-787/? I/qorvo.uwb.UwbIface: OnSessionChanged
2022-07-14 12:00:59.039 787-787/? I/qorvo.uwb.FiraController: setSessionCallback
2022-07-14 12:00:59.040 3400-24481/? D/UwbService: UwbRangingSession: Sending ranging opened callback
2022-07-14 12:00:59.040 3400-3443/? E/UwbService: Service: Unable to notify change to AdapterStateCallbacks
2022-07-14 12:00:59.043 2552-27976/? I/NearbyUWB: UWB session opened: 35684 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.043 2552-26939/? I/NearbyUWB: exec UWB operation Start ranging [CONTEXT service_id=49 ]
2022-07-14 12:00:59.044 3400-3443/? V/UwbService: DefaultSessionManager: Starting session 2
2022-07-14 12:00:59.044 787-787/? I/qorvo.uwb.FiraController: startRangingSession
2022-07-14 12:00:59.044 787-787/? I/qorvo.uwb.UwbIface: OnPreSessionStart
2022-07-14 12:00:59.115 787-787/? I/qorvo.uwb.FiraRegionUtils: SubscribeCallback
2022-07-14 12:00:59.115 787-787/? I/qorvo.uwb.FiraRegionUtils: StartSession
2022-07-14 12:00:59.115 787-787/? I/qorvo.uwb.FiraRegionUtils: CreateSessionStateMsg
2022-07-14 12:00:59.116 787-787/? I/qorvo.uwb.NlSocket: SendAndAwaitAck: Received ACK
2022-07-14 12:00:59.116 787-787/? I/qorvo.uwb.UwbIface: OnSessionChanged
2022-07-14 12:00:59.117 3400-24481/? D/UwbService: UwbRangingSession: Sending ranging started callback
2022-07-14 12:00:59.117 2552-27976/? I/NearbyUWB: UWB ranging started [CONTEXT service_id=49 ]
2022-07-14 12:00:59.118 2552-27976/? I/NearbyUWB: Local UWB address is 0XD826 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.118 2552-27976/? I/NearbyUWB: Local UWB address is 0XD826 [CONTEXT service_id=49 ]
2022-07-14 12:00:59.124 27910-27910/
2022-07-14 12:01:00.134 787-787/? W/qorvo.uwb.NlSocket: ReceiveMessage: Error reading message: Try again
2022-07-14 12:01:01.158 787-787/? W/qorvo.uwb.NlSocket: ReceiveMessage: Error reading message: Try again
2022-07-14 12:01:02.182 787-787/? W/qorvo.uwb.NlSocket: ReceiveMessage: Error reading message: Try again
2022-07-14 12:01:03.206 787-787/? W/qorvo.uwb.NlSocket: ReceiveMessage: Error reading message: Try again