Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITraceCounter

interface ITraceCounter
Extends com.amazon.apmf.IStandard ITraceCounter interface contains APIs that track time-varying numerical data. Use a ITraceCounterBuilder to set the parameters used by this interface.

Methods

timestamp()

ITraceCounter* timestamp(u64 timestamp, ClockType clock)
Sets the timestamp of the value for counter track defined by ITraceCounter.

Parameters

timestamp
u64 — Required Timestamp of tracepoint.
clock
ClockType — Required ClockType enum used to set Perfetto clock type.

Returns

ITraceCounter* ITraceCounter with set timestamp.

valueInt32()

ITraceCounter* valueInt32(i32 value)
Emit a counter value of type int32_t for counter track defined by ITraceCounter. set by ITraceCounterBuilder.

Parameters

value
i32 — Required Value of counter.

Returns

ITraceCounter* original ITraceCounter object

valueInt64()

ITraceCounter* valueInt64(i64 value)
Emit a counter value of type int64_t for counter track defined by ITraceCounter. set by ITraceCounterBuilder.

Parameters

value
i64 — Required Value of counter.

Returns

ITraceCounter* original ITraceCounter object

valueFloat()

ITraceCounter* valueFloat(float value)
Emit a counter value of type float for counter track defined by ITraceCounter. set by ITraceCounterBuilder.

Parameters

value
float — Required Value of counter.

Returns

ITraceCounter* original ITraceCounter object

valueDouble()

ITraceCounter* valueDouble(double value)
Emit a counter value of type double for counter track defined by ITraceCounter. set by ITraceCounterBuilder.

Parameters

value
double — Required Value of counter.

Returns

ITraceCounter* original ITraceCounter object

emit()

void emit()
Emit a counter with the passed value and timestamp defined by ITraceCounter If a timestamp is not defined, the timestamp will default to now Note, when a counter is emitted the timestamp will be reset
Last modified on October 29, 2026