Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

CBHBenchmarkKit

release pod licence coverage

A simple statistical time-based benchmarking framework with nanosecond precision.

Example:

Sample the amount of time to create and fill and array with 10000 entries.

CBHBenchmarkSamples *benchmark = [CBHBenchmark benchmark:^{
	NSMutableArray *array = [NSMutableArray array];
	for (NSUInteger i = 0; i < 10000; ++i)
	{
		[array addObject:[NSString stringWithFormat:@"%lu", i]];
	}
}];


/// Samples
NSUInteger count = [benchmark count];
NSArray<CBHBenchmarkSample *> *samples = [benchmark samples];
NSArray<CBHBenchmarkSample *> *sortedSamples = [benchmark sortedSamples];


/// Max, Min, and Range
CBHBenchmarkSample *min = [benchmark min];
CBHBenchmarkSample *max = [benchmark max];
CBHBenchmarkDuration *spread = [benchmark spread];


/// Mean and Median
CBHBenchmarkDuration *mean = [benchmark mean];
CBHBenchmarkDuration *median = [benchmark median];


/// Variance, Standard Deviation, Standard Error
CGFloat variance = [benchmark variance];
CBHBenchmarkDuration *standardDeviation = [benchmark standardDeviation];
CBHBenchmarkDuration *standardError = [benchmark standardError];

Licence

CBHBenchmarkKit is available under the ISC license.

About

A simple statistical time-based benchmarking framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published