Outputs

object Outputs
kotlin.Any
   ↳ androidx.benchmark.Outputs

Summary

Public methods
String
dateToFileName(date: Date = Date())

String

String

File

String
writeFile(fileName: String, reportKey: String, reportOnRunEndOnly: Boolean = false, block: (file: File) -> Unit)

Create a benchmark output File to write to.

Properties
File

The usable output directory, given permission issues with adb shell on Android R.

File

The intended output directory that respects the additionalTestOutputDir.

Public methods

dateToFileName

fun dateToFileName(date: Date = Date()): String

relativePathFor

fun relativePathFor(path: String): String

sanitizeFilename

fun sanitizeFilename(filename: String): String

testOutputFile

fun testOutputFile(filename: String): File

writeFile

fun writeFile(
    fileName: String,
    reportKey: String,
    reportOnRunEndOnly: Boolean = false,
    block: (file: File) -> Unit
): String

Create a benchmark output File to write to.

This method handles reporting files to InstrumentationStatus to request copy, writing them in the desired output directory, and handling shell access issues on Android R.

Return
The absolute path of the output File.

Properties

dirUsableByAppAndShell

val dirUsableByAppAndShell: File

The usable output directory, given permission issues with adb shell on Android R. Both the app and the shell have access to this output folder.

outputDirectory

val outputDirectory: File

The intended output directory that respects the additionalTestOutputDir.