Commit graph

9 commits

Author SHA1 Message Date
Jeff Sharkey
cbcb2926b2 Abort long-running benchmarks, report progress.
A typical storage device finishes the benchmark in under 10 seconds,
but some extremely slow devices can take minutes, resulting in a
confusing UX that looks like we've frozen.  Even worse, we keep
churning through all that I/O even though we know the device will
blow past our user-warning threshold.

So periodically check if we've timed out, and also use that to report
progress up into the Settings UI.

Test: manual
Bug: 62201209, 65639764, 67055204
Change-Id: I321397bcff230976f034cede0947d4a5a1f3e8a7
2017-11-07 09:57:12 -07:00
Jeff Sharkey
030d7007ad resolve merge conflicts of d254ce4 to master
Change-Id: Ia8dff82cb7648b568006d10bc99e2dd40a2d6e8e
2016-07-06 16:26:43 -06:00
Jeff Sharkey
f09a89a7d6 Fix copy/paste error in benchmark code.
This had minimal impact on the results, since 95% of the writes were
performed through pwrite(), but it's important to fix this for future
benchmark suites.

Bug: 29759783
Change-Id: Ic628aab98b9f9def78508cc722899afdefed84ae
2016-07-06 14:34:43 -06:00
George Burgess IV
605d7ae18d Cleanup uses of sprintf, add modes to open() with O_CREAT.
Change-Id: Iaed2538831b19ada26005bbef33cff28209c6512
2016-03-02 22:42:22 +00:00
George Burgess IV
170d8dae27 Add mode flags to open calls with O_CREAT.
Change-Id: Ib9fb61155d15ed9eb54942959af965df2fe21b71
2016-02-26 11:48:57 -08:00
Elliott Hughes
7e128fbe21 Track rename from base/ to android-base/.
Change-Id: I3096cfa50afa395d8e9a8043ab69c1e390f86ccb
2015-12-04 15:50:53 -08:00
Jeff Sharkey
d46687ee5d Use random data for benchmark instead of zeros.
If we always write zeros, we're leaving a giant pile of known
plaintext at an almost deterministic location on newly formatted
volumes.  To avoid this, repeat a 64K chunk of random data.

Bug: 22816936
Change-Id: Iedc067a519bd676a93b9d74ea4f9f77c84c8461c
2015-07-29 10:03:11 -07:00
Elliott Hughes
4e378be81e Don't use TEMP_FAILURE_RETRY on close in vold.
Bug: http://b/20501816
Change-Id: Ia0a3899947582b8dd0e8e185c203d1ad7dad572e
2015-05-28 22:02:14 -07:00
Jeff Sharkey
5a6bfca163 Initial pass at storage benchmarks.
Now that we're offering to store private app data on adopted storage
devices, the performance of those devices is much more important to
overall user experience.

To help set user expectations, this change offers to execute a
real-world benchmark on a storage device, returning a metric that can
be used to compare internal and external storage.  The benchmark is
generated from the strace-instrumented storage access patterns of
typical apps.

A typical device completes the benchmark in under two seconds on
internal storage, a UHS-3 SD card is even faster (!), but a very slow
Class 4 SD card takes about 30 seconds to complete, giving us a clear
signal.

The measured benchmark numbers are logged along with information
about the storage device, such as manufacturer, model, etc.  Card
serial numbers are scrubbed from output.

Bug: 21172095
Change-Id: I9b2713dafdfdfcf5d97bf1bc21841f39409a7e54
2015-05-15 10:48:11 -07:00