37 using analytics::Benchmark;
40 using gfx::BufferObjectElement;
43 using gfx::IndexBuffer;
52 using gfx::StateTable;
62 static const int kDefaultTrialCount = 5;
66 static const int kInnerTrialCount = 20;
68 static const double kMinValue = 1e-20;
69 static const double kMaxValue = 1e20;
71 static const double kToPercent = 1e2;
72 static const double kToKilo = 1e-3;
73 static const double kToMega = 1e-6;
74 static const double kToMilli = 1e3;
76 static const char *kUseProgramString =
"UseProgram";
77 static const char *kBindTextureString =
"BindTexture";
78 static const char *kUniformString =
"Uniform";
81 typedef GpuPerformanceTester::Measurement Measurement;
84 static const char kSceneConstantsGroup[] =
"Scene constants";
86 static const Benchmark::Descriptor kNodeCountDescriptor(
87 "Node Count", kSceneConstantsGroup,
"Nodes in Ion scene graph",
"nodes");
89 static const Benchmark::Descriptor kShapeCountDescriptor(
90 "Shape Count", kSceneConstantsGroup,
91 "Shapes in Ion scene graph",
"shapes");
93 static const Benchmark::Descriptor kDrawCountDescriptor(
94 "Draw Count", kSceneConstantsGroup,
95 "Draw calls in Ion scene graph",
"draw calls");
97 static const Benchmark::Descriptor kVertexCountDescriptor(
98 "Vertex Count", kSceneConstantsGroup,
99 "Vertices in scene",
"vertices");
101 static const Benchmark::Descriptor kPrimitiveCountDescriptor(
102 "Primitive Count", kSceneConstantsGroup,
103 "Renderable elements in scene: Triangles; points; etc.",
"primitives");
105 static const Benchmark::Descriptor kTriangleCountDescriptor(
106 "Triangle Count", kSceneConstantsGroup,
107 "Renderable triangles in scene",
"triangles");
109 static const Benchmark::Descriptor kLineCountDescriptor(
110 "Line Count", kSceneConstantsGroup,
111 "Renderable lines in scene",
"lines");
113 static const Benchmark::Descriptor kPointCountDescriptor(
114 "Point Count", kSceneConstantsGroup,
115 "Renderable points in scene",
"points");
117 static const Benchmark::Descriptor kTrianglePercentDescriptor(
118 "Triangle Percent", kSceneConstantsGroup,
119 "Percent of primitives that are triangles",
"%");
121 static const Benchmark::Descriptor kLinePercentDescriptor(
122 "Line Percent", kSceneConstantsGroup,
123 "Percent of primitives that are lines",
"%");
125 static const Benchmark::Descriptor kPointPercentDescriptor(
126 "Point Percent", kSceneConstantsGroup,
127 "Percent of primitives that are points",
"%");
129 static const Benchmark::Descriptor kVerticesPerShapeDescriptor(
130 "Vertices Per Shape", kSceneConstantsGroup,
131 "Average number of vertices per shape (draw call)",
"vertices/shape");
133 static const Benchmark::Descriptor kPrimitivesPerShapeDescriptor(
134 "Primitives Per Shape", kSceneConstantsGroup,
135 "Average number of primitives per shape (draw call)",
"primitives/shape");
137 static const Benchmark::Descriptor kTrialCountDescriptor(
138 "Trial Count", kSceneConstantsGroup,
139 "Number of trials used to compute averages.",
"frames");
141 static const Benchmark::Descriptor kBindShaderCountDescriptor(
142 "Bind Shader Count", kSceneConstantsGroup,
143 "Number of bind shader calls.",
"binds");
145 static const Benchmark::Descriptor kBindTextureCountDescriptor(
146 "Bind Texture Count", kSceneConstantsGroup,
147 "Number of bind shader calls.",
"binds");
149 static const Benchmark::Descriptor kSetUniformCountDescriptor(
150 "Set Uniform Count", kSceneConstantsGroup,
151 "Number of uniform value set calls.",
"set uniforms");
153 static const Benchmark::Descriptor kBufferMemoryDescriptor(
154 "Buffer Memory", kSceneConstantsGroup,
155 "GPU Buffer memory used during the frame",
"MB");
157 static const Benchmark::Descriptor kFboMemoryDescriptor(
158 "FBO Memory", kSceneConstantsGroup,
159 "GPU Framebuffer Object memory used during the frame",
"MB");
161 static const Benchmark::Descriptor kTextureMemoryDescriptor(
162 "Texture Memory", kSceneConstantsGroup,
163 "GPU texture memory used during the frame",
"MB");
165 static const Benchmark::Descriptor kFramebufferMemoryDescriptor(
166 "Framebuffer Memory", kSceneConstantsGroup,
"GPU Framebuffer memory",
"MB");
168 static const Benchmark::Descriptor kTotalGpuMemoryDescriptor(
169 "Total GPU Memory", kSceneConstantsGroup,
170 "Total GPU memory used during the frame (excluding frame buffer)",
"MB");
172 static const char kSceneRatesGroup[] =
"Scene Rates";
174 static const Benchmark::Descriptor kFramesPerSecondDescriptor(
175 "Frames Per Second", kSceneRatesGroup,
"Frames per second.",
178 static const Benchmark::Descriptor kNodesPerSecondDescriptor(
179 "Nodes Per Second", kSceneRatesGroup,
180 "Nodes per second.",
"Knodes/s");
182 static const Benchmark::Descriptor kShapesPerSecondDescriptor(
183 "Shapes Per Second", kSceneRatesGroup,
184 "Shapes per second.",
"Kshapes/s");
186 static const Benchmark::Descriptor kDrawCallsPerSecondDescriptor(
187 "Draw Calls Per Second", kSceneRatesGroup,
188 "Draw calls per second.",
"Kdraws/s");
190 static const Benchmark::Descriptor kVerticesPerSecondDescriptor(
191 "Vertices Per Second", kSceneRatesGroup,
192 "Millions of vertices per second.",
"Mvertices/s");
194 static const Benchmark::Descriptor kPrimitivesPerSecondDescriptor(
195 "Primitives Per Second", kSceneRatesGroup,
196 "Millions of primitives per second.",
"Mprimitives/s");
198 static const Benchmark::Descriptor kPixelsPerSecondDescriptor(
199 "Pixels Per Second", kSceneRatesGroup,
200 "Millions of pixels per second.",
"Mpixels/s");
202 static const char kTimingsGroup[] =
"Timings";
204 static const Benchmark::Descriptor kRenderTimeDescriptor(
205 "Render Time", kTimingsGroup,
206 "Time to render unmodified scene.",
"ms/frame");
208 static const Benchmark::Descriptor kResourceCreationDescriptor(
209 "Resource Creation", kTimingsGroup,
210 "Time creating GL resources; CPU-GPU Bandwidth.",
"ms/frame");
212 static const Benchmark::Descriptor kNoDrawCallsDescriptor(
213 "No Draw Calls", kTimingsGroup,
214 "Ion & OpenGL state change time; draw calls ignored.",
"ms/frame");
216 static const Benchmark::Descriptor kMinViewportDescriptor(
217 "Min Viewport", kTimingsGroup,
218 "Render time with no fill; vertex transform only.",
"ms/frame");
220 static const char kRatesBreakdownGroup[] =
"Rates Breakdown";
222 static const Benchmark::Descriptor kTransformRateDescriptor(
223 "Transform Rate", kRatesBreakdownGroup,
224 "Approximate Vertex Program performance.",
"Mtriangles/s");
226 static const Benchmark::Descriptor kFillRateDescriptor(
227 "Fill Rate", kRatesBreakdownGroup,
228 "Approximate Fragment Program performance.",
"Mpixels/s");
230 const char kPercentBreakdownGroup[] =
"Percent Breakdown";
232 static const Benchmark::Descriptor kTraversalPercentDescriptor(
233 "Traversal Percent", kPercentBreakdownGroup,
234 "Approximate Ion and OpenGL API overhead.",
"%");
236 static const Benchmark::Descriptor kTransformPercentDescriptor(
237 "Transform Percent", kPercentBreakdownGroup,
238 "Approximate Vertex Program utilization.",
"%");
240 static const Benchmark::Descriptor kFillPercentDescriptor(
241 "Fill Percent", kPercentBreakdownGroup,
242 "Approximate Fragment Program utilization.",
"%");
245 template <
typename FUNCTOR>
246 void ApplyToTree(
const NodePtr& node, FUNCTOR& f) {
249 const size_t size = node->GetChildren().size();
250 for (
size_t i = 0; i < size; ++i) {
251 ApplyToTree(node->GetChildren()[i], f);
258 struct MinifyViewport {
259 void operator()(
const NodePtr& node) {
261 if (StateTable* state_table = node->GetStateTable().Get()) {
262 static const Range2i kZeroRange(Point2i(0, 0), Point2i(0, 0));
263 static const Range2i kPixelRange(Point2i(0, 0), Point2i(1, 0));
264 if (!state_table->GetViewport().IsEmpty()) {
265 state_table->SetViewport(kPixelRange);
272 struct DisableDepthTest {
273 void operator()(
const NodePtr& node) {
275 if (StateTable* state_table = node->GetStateTable().Get()) {
276 state_table->ResetCapability(StateTable::kDepthTest);
282 struct RemoveGeometry {
283 void operator()(
const NodePtr& node) {
290 struct CountPrimitives {
299 void operator()(
const NodePtr& node) {
303 const size_t size = node->GetShapes().size();
305 for (
size_t i = 0; i < size; ++i) {
306 const ShapePtr& shape = node->GetShapes()[i];
309 if (
const size_t range_count = shape->GetVertexRangeCount()) {
310 for (
size_t r = 0; r < range_count; ++r) {
311 if (shape->IsVertexRangeEnabled(r)) {
312 count += shape->GetVertexRange(r).GetSize();
318 if (IndexBuffer* index_buffer = shape->GetIndexBuffer().Get()) {
320 count += index_buffer->GetCount();
323 if (shape->GetAttributeArray().Get() &&
324 shape->GetAttributeArray()->GetBufferAttributeCount()) {
325 const Attribute& attrib =
326 shape->GetAttributeArray()->GetBufferAttribute(0);
327 const BufferObjectElement& buffer_element =
328 attrib.GetValue<BufferObjectElement>();
329 count = buffer_element.buffer_object->GetCount();
336 switch (shape->GetPrimitiveType()) {
341 case Shape::kLineLoop:
344 case Shape::kLineStrip:
351 case Shape::kTriangles:
355 case Shape::kTriangleFan:
356 case Shape::kTriangleStrip:
372 static NodePtr GetClearNode(uint32
width, uint32 height,
374 NodePtr clear_node(
new(allocator) Node);
375 StateTablePtr clear_state_table(
new(allocator) StateTable(width, height));
376 clear_state_table->SetViewport(
Range2i(Point2i(0, 0),
377 Point2i(width, height)));
378 clear_state_table->SetClearColor(Vector4f(1.f, 0.f, 0.f, 1.0f));
379 clear_state_table->SetClearDepthValue(1.f);
380 clear_node->SetStateTable(clear_state_table);
384 static void ResetVariable(Benchmark::AccumulatedVariable* variable) {
386 variable->samples = 0;
387 variable->minimum = kMaxValue;
388 variable->maximum = kMinValue;
390 variable->standard_deviation = 0;
393 static void ClearVariable(Benchmark::AccumulatedVariable* variable) {
395 variable->samples = 0;
396 variable->minimum = 0;
397 variable->maximum = 0;
399 variable->standard_deviation = 0;
402 static void AccumulateVariable(Benchmark::AccumulatedVariable* variable,
403 const GpuPerformanceTester::Measurement& m) {
408 variable->mean += m.mean;
410 variable->standard_deviation += m.deviation;
413 if (variable->maximum != kMinValue) {
414 variable->maximum += m.maximum;
416 variable->maximum = m.maximum;
418 if (variable->minimum != kMaxValue) {
419 variable->minimum += m.minimum;
421 variable->minimum = m.minimum;
425 static void AccumulateInverseVariable(
426 Benchmark::AccumulatedVariable* inverse_variable,
427 const GpuPerformanceTester::Measurement& m) {
429 if (inverse_variable->mean != 0.0) {
430 inverse_variable->mean = 1.0 / (1.0 / inverse_variable->mean +
431 1.0 / m.inverse_mean);
433 inverse_variable->mean = m.inverse_mean;
435 if (inverse_variable->standard_deviation != 0.0) {
436 inverse_variable->standard_deviation =
437 1.0 / (1.0 / inverse_variable->standard_deviation +
438 1.0 / m.inverse_deviation);
440 inverse_variable->standard_deviation = m.inverse_deviation;
444 if (inverse_variable->maximum != kMinValue) {
445 inverse_variable->maximum = 1.0 / (1.0 / inverse_variable->maximum +
448 inverse_variable->maximum = 1.0 / m.minimum;
450 if (inverse_variable->minimum != kMaxValue) {
451 inverse_variable->minimum = 1.0 / (1.0 / inverse_variable->minimum +
454 inverse_variable->minimum = 1.0 / m.maximum;
464 NodePtr instance(
new(scene->GetAllocator()) Node);
466 if (StateTable* scene_state_table = scene->GetStateTable().Get()) {
468 new(scene_state_table->GetAllocator()) StateTable);
469 state_table->CopyFrom(*scene_state_table);
470 instance->SetStateTable(state_table);
473 instance->SetShaderProgram(scene->GetShaderProgram());
475 const size_t uniform_size = scene->GetUniforms().size();
476 for (
size_t i = 0; i < uniform_size; ++i) {
477 instance->AddUniform(scene->GetUniforms()[i]);
480 const size_t uniform_blocks_size = scene->GetUniformBlocks().size();
481 for (
size_t i = 0; i < uniform_blocks_size; ++i) {
482 instance->AddUniformBlock(scene->GetUniformBlocks()[i]);
485 const size_t shape_size = scene->GetShapes().size();
486 for (
size_t i = 0; i < shape_size; ++i) {
487 instance->AddShape(scene->GetShapes()[i]);
490 const size_t children_size = scene->GetChildren().size();
491 for (
size_t i = 0; i < children_size; ++i) {
492 instance->AddChild(
InstanceCopy(scene->GetChildren()[i]));
495 instance->Enable(scene->IsEnabled());
500 : number_of_trials_(kDefaultTrialCount),
503 enables_(kConstants | kBaseline | kNoDraw |
504 kMinimumViewport | kGpuMemory | kGlTrace),
513 num_bind_texture_(0),
518 framebuffer_memory_(0),
519 baseline_(kRenderTimeDescriptor, 0, kMaxValue, kMinValue, 0.0, 0.0),
520 baseline_inverse_(kRenderTimeDescriptor, 0, kMaxValue, kMinValue,
522 resource_(kResourceCreationDescriptor, 0, kMaxValue, kMinValue, 0.0, 0.0),
523 no_draw_calls_(kNoDrawCallsDescriptor, 0, kMaxValue, kMinValue, 0.0, 0.0),
524 min_viewport_(kMinViewportDescriptor, 0, kMaxValue, kMinValue, 0.0, 0.0),
525 min_viewport_inverse_(kMinViewportDescriptor, 0, kMaxValue, kMinValue,
538 CountPrimitives primitive_count;
539 ApplyToTree(scene, primitive_count);
540 num_nodes_ +=
static_cast<int>(primitive_count.node_count);
541 num_shapes_ +=
static_cast<int>(primitive_count.shape_count);
542 num_draws_ +=
static_cast<int>(primitive_count.draw_count);
543 num_triangles_ +=
static_cast<int>(primitive_count.triangle_count);
544 num_lines_ +=
static_cast<int>(primitive_count.line_count);
545 num_points_ +=
static_cast<int>(primitive_count.point_count);
546 num_vertices_ +=
static_cast<int>(primitive_count.vertex_count);
555 const size_t current_buffer_memory =
556 renderer->GetGpuMemoryUsage(Renderer::kBufferObject);
559 const size_t current_fbo_memory =
560 renderer->GetGpuMemoryUsage(Renderer::kFramebufferObject);
563 const size_t current_texture_memory =
564 renderer->GetGpuMemoryUsage(Renderer::kTexture);
568 GLint red_bits, green_bits, blue_bits, alpha_bits, depth_bits, stencil_bits;
569 graphics_manager->GetIntegerv(
GL_RED_BITS, &red_bits);
571 graphics_manager->GetIntegerv(
GL_BLUE_BITS, &blue_bits);
576 static const int kBufferCount = 2;
577 const int bits = depth_bits + stencil_bits +
578 (red_bits + green_bits + blue_bits + alpha_bits) * kBufferCount;
579 const size_t current_framebuffer_memory = bits/8 *
width_ *
height_;
581 current_framebuffer_memory);
591 std::ostream* prev_stream = graphics_manager->GetTracingStream();
592 std::ostringstream trace_stream;
593 graphics_manager->SetTracingStream(&trace_stream);
594 renderer->gfx::Renderer::DrawScene(scene);
595 graphics_manager->SetTracingStream(prev_stream);
633 renderer->ClearCachedBindings();
642 int num_primitives = 0;
643 double percent_triangles = 0;
644 double percent_lines = 0;
645 double percent_points = 0;
646 double vertices_per_shape = 0;
647 double primitives_per_shape = 0;
660 if (num_primitives > 0) {
663 static_cast<double>(num_primitives) * kToPercent;
666 static_cast<double>(num_primitives) * kToPercent;
669 static_cast<double>(num_primitives) * kToPercent;
674 primitives_per_shape =
static_cast<double>(num_primitives) /
702 vertices_per_shape));
704 primitives_per_shape));
720 const double kBytesToMegabytes = 1.0 / (1024 * 1024);
721 const size_t total_gpu_memory =
724 kBufferMemoryDescriptor,
727 kFboMemoryDescriptor,
728 static_cast<double>(
fbo_memory_) * kBytesToMegabytes));
730 kTextureMemoryDescriptor,
733 kFramebufferMemoryDescriptor,
734 static_cast<double>(framebuffer_memory_) * kBytesToMegabytes));
736 kTotalGpuMemoryDescriptor,
737 static_cast<double>(total_gpu_memory) * kBytesToMegabytes));
752 double baseline, deviation, min, max;
765 deviation * kToKilo));
778 deviation * kToKilo));
791 deviation * kToKilo));
804 deviation * kToMega));
807 baseline = fps_baseline * num_primitives;
808 deviation = fps_deviation * num_primitives;
809 min = fps_min * num_primitives;
810 max = fps_max * num_primitives;
817 deviation * kToMega));
821 baseline = fps_baseline * num_pixels;
822 deviation = fps_deviation * num_pixels;
823 min = fps_min * num_pixels;
824 max = fps_max * num_pixels;
831 deviation * kToMega));
884 const double inv_transform_deviation =
886 const double num_mega_primitives = num_primitives *
GetTrialCount() * kToMega;
887 const double transform_tps = num_mega_primitives * inv_transform_time;
888 const double transform_tps_deviation =
889 num_mega_primitives * inv_transform_deviation;
890 const double transform_tps_min = inv_transform_min * num_mega_primitives;
891 const double transform_tps_max = inv_transform_max * num_mega_primitives;
898 transform_tps_deviation));
902 const double fill_time =
904 const double fill_deviation =
906 const double fill_min =
908 const double fill_max =
910 const double inv_fill_time =
915 const double fill_pps = pixel_count * inv_fill_time;
916 const double fill_pps_deviation = pixel_count * inv_fill_deviation;
917 const double fill_pps_min =
918 fill_max == kMinValue ? kMaxValue : pixel_count / fill_max;
919 const double fill_pps_max =
920 fill_min == kMinValue ? kMaxValue : pixel_count / fill_min;
924 fill_pps_min * kToMega,
925 fill_pps_max * kToMega,
927 fill_pps_deviation * kToMega));
930 const double inv_total_time =
932 const double inv_time_min_traversal =
934 const double inv_time_max_traversal =
937 const double traversal_min_frac =
939 const double traversal_max_frac =
941 const double traversal_frac_deviation =
946 traversal_min_frac * kToPercent,
947 traversal_max_frac * kToPercent,
948 traversal_frac * kToPercent,
949 traversal_frac_deviation * kToPercent));
951 const double transform_frac = transform_time * inv_total_time;
952 const double inv_time_min_transform =
954 const double inv_time_max_transform =
956 const double transform_min_frac = transform_min * inv_time_min_transform;
957 const double transform_max_frac = transform_max * inv_time_max_transform;
958 const double transform_frac_deviation =
959 transform_deviation * inv_total_time;
963 transform_min_frac * kToPercent,
964 transform_max_frac * kToPercent,
965 transform_frac * kToPercent,
966 transform_frac_deviation * kToPercent));
968 const double fill_frac = fill_time * inv_total_time;
969 const double inv_time_min_fill =
971 const double inv_time_max_fill =
973 const double fill_frac_min = fill_min * inv_time_min_fill;
974 const double fill_frac_max = fill_max * inv_time_max_fill;
975 const double fill_frac_deviation = fill_deviation * inv_total_time;
979 fill_frac_min * kToPercent,
980 fill_frac_max * kToPercent,
981 fill_frac * kToPercent,
982 fill_frac_deviation * kToPercent));
1004 framebuffer_memory_ = 0;
1022 scene->GetAllocator()));
1037 MinifyViewport minviewport_functor;
1038 ApplyToTree(test_scene, minviewport_functor);
1039 static const Range2i kPixelRange(Point2i(0, 0), Point2i(1, 1));
1040 if (!test_scene->GetStateTable().Get()) {
1041 test_scene->SetStateTable(
1044 test_scene->GetStateTable()->SetViewport(kPixelRange);
1057 RemoveGeometry remove_geometry_functor;
1058 ApplyToTree(test_scene, remove_geometry_functor);
1071 DisableDepthTest disable_depth_test_functor;
1072 ApplyToTree(scene, disable_depth_test_functor);
1079 renderer->gfx::Renderer::DrawScene(clear_node);
1083 renderer->gfx::Renderer::DrawScene(scene);
1084 renderer->gfx::Renderer::DrawScene(clear_node);
1085 graphics_manager->Finish();
1087 double time_sum = 0.0;
1088 double inv_time_sum = 0.0;
1089 double time_squared = 0.0;
1090 double inv_time_squared = 0.0;
1091 double minimum = std::numeric_limits<double>::max();
1092 double maximum = std::numeric_limits<double>::min();
1095 for (
int i = 0; i < kInnerTrialCount; ++i)
1096 renderer->gfx::Renderer::DrawScene(scene);
1097 graphics_manager->Finish();
1098 double frame_time = timer.
GetInS() / kInnerTrialCount;
1101 frame_time = frame_time > 0.0 ? frame_time : 0.0;
1102 time_sum += frame_time;
1103 time_squared += frame_time * frame_time;
1104 inv_time_sum += 1.0 / frame_time;
1105 inv_time_squared += 1.0 / frame_time * 1.0 / frame_time;
1106 minimum = std::min(frame_time, minimum);
1107 maximum = std::max(frame_time, maximum);
1110 const double ave_time = time_sum * inv_num_trials;
1111 const double ave_time_squared = time_squared * inv_num_trials;
1112 const double ave_inv_time = inv_time_sum * inv_num_trials;
1113 const double ave_inv_time_squared = inv_time_squared * inv_num_trials;
1114 const double stddev_time = kInnerTrialCount *
1115 sqrt(fabs(ave_time_squared - ave_time * ave_time));
1116 const double stddev_inv_time = kInnerTrialCount *
1117 sqrt(fabs(ave_inv_time_squared - ave_inv_time * ave_inv_time));
1120 ave_time, stddev_time, ave_inv_time, stddev_inv_time, minimum, maximum);
1132 RendererPtr resource_renderer_one(
new Renderer(graphics_manager));
1133 resource_renderer_one->gfx::Renderer::DrawScene(clear_node);
1135 resource_renderer_one->gfx::Renderer::DrawScene(scene);
1136 graphics_manager->Finish();
1137 const double time_one = timer.
GetInS();
1139 RendererPtr resource_renderer_two(
new Renderer(graphics_manager));
1140 resource_renderer_two->gfx::Renderer::DrawScene(clear_node);
1142 resource_renderer_two->gfx::Renderer::DrawScene(scene);
1143 graphics_manager->Finish();
1144 const double time_two = timer.
GetInS();
1146 Measurement m((time_one + time_two) / 2.0,
1147 fabs(time_one - time_two) / 2.0,
1148 (1.0 / time_one + 1.0 / time_two) / 2.0,
1149 fabs(1.0 / time_one - 1.0 / time_two) / 2.0,
1150 time_one < time_two ? time_one : time_two,
1151 time_one > time_two ? time_one : time_two);
1159 #endif // !ION_PRODUCTION
base::ReferentPtr< Node >::Type NodePtr
double GetInS() const
Returns the elapsed time since construction or the last Reset() in seconds.
base::ReferentPtr< Image >::Type ImagePtr
base::ReferentPtr< Shape >::Type ShapePtr
Convenience typedef for shared pointer to a Shape.
Range< 1, int32 > Range1i
void AddAccumulatedVariable(const AccumulatedVariable &variable)
Range< 2, int32 > Range2i
base::ReferentPtr< StateTable >::Type StateTablePtr
Convenience typedef for shared pointer to a StateTable.
SharedPtr< Allocator > AllocatorPtr
base::ReferentPtr< IndexBuffer >::Type IndexBufferPtr
#define DCHECK_NE(val1, val2)
void Reset()
Resets the timer.
#define DCHECK_GE(val1, val2)
This struct represents a number that is constant over all samples.
void AddConstant(const Constant &constant)
Each of these adds a measurement of a specific type to the benchmark results.
base::ReferentPtr< GraphicsManager >::Type GraphicsManagerPtr
Convenience typedef for shared pointer to a GraphicsManager.
The Benchmark class provides types and utilities to make it easier to create performance benchmarks...
double standard_deviation
base::ReferentPtr< Renderer >::Type RendererPtr
Convenience typedef for shared pointer to a Renderer.
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
This struct represents accumulated values for a variable.