Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duty cycle tracker #536

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow disabling duty cycle trackers
marc-adaptive committed Dec 19, 2024
commit 729ba8e2be340cec640ac23f651f14495222ef89
15 changes: 15 additions & 0 deletions artio-core/src/main/java/uk/co/real_logic/artio/FixCounters.java
Original file line number Diff line number Diff line change
@@ -159,6 +159,11 @@ public AtomicCounter negativeTimestamps()

public DutyCycleTracker getFramerDutyCycleTracker(final long threshold)
{
if (threshold == 0)
{
return new DutyCycleTracker();
}

return new DutyCycleStallTracker(
newCounter(FRAMER_MAX_CYCLE_TIME_TYPE_ID.id(), "framer max cycle time in ns"),
newCounter(FRAMER_CYCLE_TIME_THRESHOLD_EXCEEDED_TYPE_ID.id(),
@@ -169,6 +174,11 @@ public DutyCycleTracker getFramerDutyCycleTracker(final long threshold)

public DutyCycleTracker getIndexerDutyCycleTracker(final long threshold)
{
if (threshold == 0)
{
return new DutyCycleTracker();
}

return new DutyCycleStallTracker(
newCounter(INDEXER_MAX_CYCLE_TIME_TYPE_ID.id(), "indexer max cycle time in ns"),
newCounter(INDEXER_CYCLE_TIME_THRESHOLD_EXCEEDED_TYPE_ID.id(),
@@ -179,6 +189,11 @@ public DutyCycleTracker getIndexerDutyCycleTracker(final long threshold)

public DutyCycleTracker getLibraryDutyCycleTracker(final int libraryId, final long threshold)
{
if (threshold == 0)
{
return new DutyCycleTracker();
}

return new DutyCycleStallTracker(
newCounter(LIBRARY_MAX_CYCLE_TIME_TYPE_ID.id(), "library " + libraryId + " max cycle time in ns"),
newCounter(LIBRARY_CYCLE_TIME_THRESHOLD_EXCEEDED_TYPE_ID.id(),
Original file line number Diff line number Diff line change
@@ -1300,7 +1300,7 @@ public EngineConfiguration cancelOnDisconnectTimeoutWindowInMs(final int cancelO
* Set a threshold for the framer work cycle time which when exceeded it will increment the
* framer cycle time exceeded count.
*
* @param framerCycleThresholdNs value in nanoseconds
* @param framerCycleThresholdNs value in nanoseconds. The value 0 will disable duty cycle tracking on the framer.
* @return this for fluent API.
*/
public EngineConfiguration framerCycleThresholdNs(final long framerCycleThresholdNs)
@@ -1313,7 +1313,7 @@ public EngineConfiguration framerCycleThresholdNs(final long framerCycleThreshol
* Set a threshold for the indexer work cycle time which when exceeded it will increment the
* indexer cycle time exceeded count.
*
* @param indexerCycleThresholdNs value in nanoseconds
* @param indexerCycleThresholdNs value in nanoseconds. The value 0 will disable duty cycle tracking on the indexer.
* @return this for fluent API.
*/
public EngineConfiguration indexerCycleThresholdNs(final long indexerCycleThresholdNs)
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ public LibraryConfiguration reproduceInbound(
* Set a threshold for the library work cycle time which when exceeded it will increment the
* library cycle time exceeded count.
*
* @param libraryCycleThresholdNs value in nanoseconds
* @param libraryCycleThresholdNs value in nanoseconds. The value 0 will disable duty cycle tracking on the library.
* @return this for fluent API.
*/
public LibraryConfiguration libraryCycleThresholdNs(final long libraryCycleThresholdNs)