google / caliper

Micro-benchmarking library for Java
Apache License 2.0
816 stars 109 forks source link

Moe Sync #402

Closed ronshapiro closed 6 years ago

ronshapiro commented 6 years ago

This code has been reviewed and submitted internally. Feel free to discuss on the PR and we can submit follow-up changes as necessary.

Commits:

Change the default VM executable for Android devices to app_process. I think it's probably a better default that should at least in theory be closer to what you'll actually get when running something as an app. ade54e5b1d825152bf86c3b0eb13eaebabe60c44 -------

Some changes to Caliper's proguard rules (and adding some serialVersionUIDs to Serializable classes that were missing it) to ensure that Caliper works when the worker/proxy code has been proguarded with release flags (obfuscation, etc.) while the runner hasn't. Basically, just ensure that all com.google.caliper classes and any Serializable classes we need for communication are kept and not renamed. c9b0f2966c9d0f79f6f7599af480c15ea1ec2e9c -------

Some changes to CaliperProxyActivity. Mainly, don't have the app use MultiDexApplication, remove the multidex support library from its deps, and remove the code for extracting dexes from the apk. None of this should be needed since the new way of running Caliper on Android requires L, which has native multidex support, anyway. Also change debuggable="true" to "false" for the app (and for the legacy mode app), since this can prevent Android from optimizing it as much as possible. Since we aren't running benchmarks directly in the app, but rather starting separate VMs for them, I'm not sure this actually matters in practice, but in case it does, it's probably better to use debuggable="false". ee2721acd5d3e8c6da08b402408093052705d9a7