Package: android.hardware.tests.msgq@1.0

IBenchmarkMsgQ

interface IBenchmarkMsgQ

Methods

configureClientInboxSyncReadWrite

configureClientInboxSyncReadWrite ()
generates (bool ret, fmq_sync<uint8_t> mqDescIn)

This method requests the service to set up Synchronous read/write wait-free FMQ with the client as reader.

Details
Generates
ret
Will be true if the setup was successful, false otherwise.
mqDescIn
This structure describes the FMQ that was set up by the service.Client can use it to set up the FMQ at its end.

configureClientOutboxSyncReadWrite

configureClientOutboxSyncReadWrite ()
generates (bool ret, fmq_sync<uint8_t> mqDescOut)

This method requests the service to set up Synchronous read/write wait-free FMQ with the client as writer.

Details
Generates
ret
Will be true if the setup was successful, false otherwise.
mqDescOut
This structure describes the FMQ that was set up by the service.Client can use it to set up the FMQ at its end.

requestWrite

requestWrite (int32_t count)
generates (bool ret)

This method request the service to write into the FMQ.

Details
Parameters
count
Number to messages to write.
Generates
ret
Will be true if the write operation was successful, false otherwise.

requestRead

requestRead (int32_t count)
generates (bool ret)

This method request the service to read from the FMQ.

Details
Parameters
count
Number to messages to read .@ret Will be true if the read operation was successful, false otherwise.
Generates
ret

benchmarkPingPong

benchmarkPingPong (uint32_t numIter)

This method kicks off a benchmarking experiment where the client writes a message into its outbox FMQ, the service reads it and writes it into the client's inbox FMQ and the client reads the message.The average time taken for the experiment is measured.

Details
Parameters
numIter
The number of iterations to run the experiment.

benchmarkServiceWriteClientRead

benchmarkServiceWriteClientRead (uint32_t numIter)

This method kicks off a benchmarking experiment where the service writes into an FMQ and the client reads the same.

Details
Parameters
numIter
The number of iterations to run the experiment.

sendTimeData

sendTimeData (vec<int64_t> timeData)

This method sends a vector of time duration(in ns).

Details
Parameters
timeData
vector of time instants measured by client.Each entry is the number of ns between the epoch and a std::chrono::time_point.