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

JBR-7028 Implement FPS counter on Linux #372

Closed
wants to merge 2 commits into from
Closed

Conversation

mkartashev
Copy link
Collaborator

JBR-7028 Implement FPS counter on Linux

Please review this from the point of view of usability both on the provider and the supplier side. We will add JBRApi for external access in a separate commit.

I suggest that those toolkits that can provide more or less reliable hardware FPS use the same counter name; here, it is java2d.native.frames, but any other will do as well.

Copy link
Collaborator

@avu avu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

synchronized (w.perfCounters) {
newCounter = w.perfCounters.compute(counterName, (k, v) ->
v == null
? new PerfCounter(curTimeNanos, 1L)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's further down at line 4597. Simply a two-field record

private record PerfCounter(Long updateTimeNanos, Long value) {}

@mkartashev
Copy link
Collaborator Author

Merged into jbr21 as 9d011d2
A separate commit will be prepared for main as it lacks the Wayland toolkit.

@mkartashev mkartashev closed this May 14, 2024
@mkartashev mkartashev deleted the mkartash/JBR-7028 branch May 14, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants