Skip to content

Conversation

@LeeCampbell
Copy link
Collaborator

The new HistogramFactory class allow consumers to use a fluent syntax to construct a histogram or recorder instance. For example the code below creates a Recorder that wraps a LongConcurrentHistogram that will allow thread safe reads and write.

var recorder = HistogramFactory
                .With64BitBucketSize()                  //LongHistogram
                .WithValuesFrom(1)                      //Default value
                .WithValuesUpTo(TimeStamp.Minutes(10))  //Default value
                .WithPrecisionOf(3)                     //Default value
                .WithThreadSafeWrites()                 //Switches internal imp to concurrent version i.e. LongConcurrentHistogram
                .WithThreadSafeReads()                  //returns a Recorder that wraps the LongConcurrentHistogram
                .Create();

Closes #16
Targets #7 and HdrHistogram/HdrHistogram#58

@AppVeyorBot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants