9#ifndef INCLUDED_BSLMT_THROUGHPUTBENCHMARKRESULT
10#define INCLUDED_BSLMT_THROUGHPUTBENCHMARKRESULT
113#include <bslscm_version.h>
124#include <bsl_vector.h>
129class ThroughputBenchmarkResult_TestUtil;
169 int threadGroupIndex)
const;
299 double getValue(
int threadGroupIndex,
301 int sampleIndex)
const;
308 void getMedian(
double *median,
int threadGroupIndex)
const;
319 int threadGroupIndex)
const;
331 int threadGroupIndex)
const;
347 int threadGroupIndex)
const;
412 d_vecThroughputs[sampleIndex][threadGroupIndex][threadIndex] = value;
420 return static_cast<int>(d_vecThroughputs.size());
429 return static_cast<int>(d_vecThroughputs[0].size());
438 return static_cast<int>(d_vecThroughputs[0][threadGroupIndex].size());
450 for (
int i = 0; i < nThreadGroups; ++i) {
460 int sampleIndex)
const
469 return d_vecThroughputs[sampleIndex][threadGroupIndex][threadIndex];
476 return d_vecThroughputs.get_allocator().mechanism();
496 return d_data.d_vecThroughputs;
Definition bslstl_vector.h:1120
Definition bslma_allocator.h:545
Definition bslmf_movableref.h:752
Definition bslmt_throughputbenchmarkresult.h:366
ThroughputBenchmarkResult_TestUtil(ThroughputBenchmarkResult &data)
Definition bslmt_throughputbenchmarkresult.h:485
bsl::vector< bsl::vector< bsl::vector< double > > > & throughputs()
Definition bslmt_throughputbenchmarkresult.h:494
~ThroughputBenchmarkResult_TestUtil()=default
Destroy this object.
Definition bslmt_throughputbenchmarkresult.h:140
int numThreadGroups() const
Return the number of thread groups.
Definition bslmt_throughputbenchmarkresult.h:424
double getValue(int threadGroupIndex, int threadIndex, int sampleIndex) const
Definition bslmt_throughputbenchmarkresult.h:458
ThroughputBenchmarkResult(bslma::Allocator *basicAllocator=0)
void getPercentile(double *percentile, double percentage, int threadGroupIndex) const
BSLMF_NESTED_TRAIT_DECLARATION(ThroughputBenchmarkResult, bslma::UsesBslmaAllocator)
ThroughputBenchmarkResult(const ThroughputBenchmarkResult &original, bslma::Allocator *basicAllocator=0)
void getMedian(double *median, int threadGroupIndex) const
void setThroughput(int threadGroupIndex, int threadIndex, int sampleIndex, double value)
Definition bslmt_throughputbenchmarkresult.h:399
ThroughputBenchmarkResult(int numSamples, const bsl::vector< int > &threadGroupSizes, bslma::Allocator *basicAllocator=0)
int totalNumThreads() const
Return the total number of threads.
Definition bslmt_throughputbenchmarkresult.h:442
bslma::Allocator * allocator() const
Return the allocator used by this object.
Definition bslmt_throughputbenchmarkresult.h:474
bsls::Types::Int64 Int64
Definition bslmt_throughputbenchmarkresult.h:144
ThroughputBenchmarkResult(bslmf::MovableRef< ThroughputBenchmarkResult > original) BSLS_KEYWORD_NOEXCEPT
void getPercentiles(bsl::vector< double > *percentiles, int threadGroupIndex) const
bsl::vector< double > DoubleVector
Definition bslmt_throughputbenchmarkresult.h:145
int numThreads(int threadGroupIndex) const
Definition bslmt_throughputbenchmarkresult.h:433
~ThroughputBenchmarkResult()=default
Destroy this object.
ThroughputBenchmarkResult & operator=(const ThroughputBenchmarkResult &rhs)
int numSamples() const
Return the number of test samples.
Definition bslmt_throughputbenchmarkresult.h:418
void getThreadPercentiles(bsl::vector< bsl::vector< double > > *percentiles, int threadGroupIndex) const
ThroughputBenchmarkResult(bslmf::MovableRef< ThroughputBenchmarkResult > original, bslma::Allocator *basicAllocator)
void initialize(int numSamples, const bsl::vector< int > &threadGroupSizes)
ThroughputBenchmarkResult & operator=(bslmf::MovableRef< ThroughputBenchmarkResult > rhs)
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
Definition bslmt_barrier.h:344
Definition bslma_usesbslmaallocator.h:344
long long Int64
Definition bsls_types.h:134