Skip to content

Update counters to LongAdder as appropriate #54

@myllynen

Description

@myllynen

Parfait already requires Java 8 which introduced LongAdder. From https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/LongAdder.html:

This class is usually preferable to AtomicLong when multiple threads update a common sum that is used for purposes such as collecting statistics, not for fine-grained synchronization control. Under low update contention, the two classes have similar characteristics. But under high contention, expected throughput of this class is significantly higher, at the expense of higher space consumption.

Counters implemented with AtomicInteger should be migrated to LongAdded as appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions