Screen stream metric count types

Types of metric counts for streams

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_STREAM_METRIC_OBJECT_COUNT = 0,
    SCREEN_STREAM_METRIC_API_COUNT = 1,
    SCREEN_STREAM_METRIC_DRAW_COUNT = 2,
    SCREEN_STREAM_METRIC_TRIANGLE_COUNT = 3,
    SCREEN_STREAM_METRIC_VERTEX_COUNT = 4,
    SCREEN_STREAM_METRIC_IMAGE_DATA_BYTES = 5,
    SCREEN_STREAM_METRIC_BUFFER_DATA_BYTES = 6,
    SCREEN_STREAM_METRIC_BLIT_COUNT = 7,
    SCREEN_STREAM_METRIC_BLIT_PIXELS = 8,
    SCREEN_STREAM_METRIC_BLIT_READS = 9,
    SCREEN_STREAM_METRIC_BLIT_WRITES = 10,
    SCREEN_STREAM_METRIC_POST_COUNT = 11,
    SCREEN_STREAM_METRIC_POST_PIXELS = 12,
    SCREEN_STREAM_METRIC_CPU_TIME = 13,
    SCREEN_STREAM_METRIC_GPU_TIME = 14
};

Data:

SCREEN_STREAM_METRIC_OBJECT_COUNT
A general purpose counter whose meaning is defined by SDKs (e.g., WebKit, Adobe AIR, ...).
SCREEN_STREAM_METRIC_API_COUNT
The number of OpenGL ES 1.X, 2.X, or 3.X, and OpenVG API calls that were made by the process owning the stream since the last time Screen stream metrics were queried.

If multiple processes, other than the one that owns the stream, made OpenGL ES 1.X, 2.X, 3.X, or OpenVG API calls to the stream, these API calls aren't counted.

SCREEN_STREAM_METRIC_DRAW_COUNT
The number of draw API calls (e.g., glDrawArrays(), glDrawElements(), ...) that were made by in the stream since the last time Screen stream metrics were queried.

This metric isn't counted for OpenVG API calls.

SCREEN_STREAM_METRIC_TRIANGLE_COUNT
An estimate of the number of triangles drawn in the stream since the last time Screen stream metrics were queried.

This count is an estimate because two triangles are counted per line, and two triangles are also counted per point. This metric isn't counted for OpenVG API calls.

SCREEN_STREAM_METRIC_VERTEX_COUNT
An estimate of the number of vertices passed to OpenGL in the stream since the last time Screen stream metrics were queried.

This metric isn't counted for OpenVG API calls.

SCREEN_STREAM_METRIC_IMAGE_DATA_BYTES
An estimate of the number of bytes requested to upload the texture in the stream since the last time Screen stream metrics were queried.

This metric isn't counted for OpenVG API calls.

SCREEN_STREAM_METRIC_BUFFER_DATA_BYTES
An estimate of the number of bytes uploaded to vertex buffers in the stream (e.g., from calls such as glBufferData(), glBufferSubData(), ...) since the last time Screen stream metrics were queried.

This metric isn't counted for OpenVG API calls.

SCREEN_STREAM_METRIC_BLIT_COUNT
The number of blit requests (when the stream was a target of a blit) since the last time Screen stream metrics were queried.
SCREEN_STREAM_METRIC_BLIT_PIXELS
The number of pixels affected by the blit requests (when the stream was a target of a blit) since the last time Screen stream metrics were queried.
SCREEN_STREAM_METRIC_BLIT_READS
An estimate of the number of bytes that have been read from the stream since the last time Screen stream metrics were queried.

The number of bytes read is an estimate based on the number of pixels affected by the blit requests.

SCREEN_STREAM_METRIC_BLIT_WRITES
An estimate of the number of bytes that have been written to the stream since the last time Screen stream metrics were queried.

The number of bytes written is an estimate based on the number of pixels affected by the blit requests.

SCREEN_STREAM_METRIC_POST_COUNT
The number times that the stream has posted since the last time Screen stream metrics were queried.
SCREEN_STREAM_METRIC_POST_PIXELS
The number of pixels that were marked as dirty in all of the stream posts since the last time Screen stream metrics were queried.
SCREEN_STREAM_METRIC_CPU_TIME
An estimate of the total CPU time (in microseconds) spent preparing updates.

The quantity is estimated by measuring the time between the stream timestamp property and the time when screen_post_stream() is called. The SCREEN_PROPERTY_TIMESTAMP must be set on the stream for this metric to be reliable.

SCREEN_STREAM_METRIC_GPU_TIME
An estimate of the total GPU time (in microseconds) spent rendering to back buffers.

The quantity is estimated by measuring the time between when eglSwapBuffers() is called and when the post is actually flushed out to the server. This metric is reliable only if the GPU does most of its rendering after eglSwapBuffers() is called.

Library:

libscreen

Description:

The metrics are on a per-stream basis, and the counts are reset after being queried. That is, the counts are reset to 0 after you call screen_get_stream_property_llv() to retrieve SCREEN_PROPERTY_METRICS.