You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mz...@apache.org on 2018/12/06 22:45:29 UTC

[mesos] 01/06: Added default arguments to `FrameworkProfile` in allocator benchmark.

This is an automated email from the ASF dual-hosted git repository.

mzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit ed7557d71ff5bfb05b9726b714cca6a3de2f2273
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Fri Oct 12 17:04:25 2018 -0700

    Added default arguments to `FrameworkProfile` in allocator benchmark.
    
    For frameworks that do not want to configure task launches, we
    should provide some default task launch settings to simplify the
    benchmark settings.
    
    Review: https://reviews.apache.org/r/69092
---
 src/tests/hierarchical_allocator_benchmarks.cpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/tests/hierarchical_allocator_benchmarks.cpp b/src/tests/hierarchical_allocator_benchmarks.cpp
index 6c6330e..b2fa614 100644
--- a/src/tests/hierarchical_allocator_benchmarks.cpp
+++ b/src/tests/hierarchical_allocator_benchmarks.cpp
@@ -71,12 +71,16 @@ namespace tests {
 // offer acceptance/rejection.
 struct FrameworkProfile
 {
-  FrameworkProfile(const string& _name,
-                   const set<string>& _roles,
-                   size_t _instances,
-                   size_t _maxTasksPerInstance,
-                   const Resources& _taskResources,
-                   size_t _maxTasksPerOffer)
+  FrameworkProfile(
+      const string& _name,
+      const set<string>& _roles,
+      size_t _instances,
+      // For frameworks that do not care about launching tasks, we provide
+      // some default task launch settings.
+      size_t _maxTasksPerInstance = 100,
+      const Resources& _taskResources =
+        CHECK_NOTERROR(Resources::parse("cpus:1;mem:100")),
+      size_t _maxTasksPerOffer = 10)
     : name(_name),
       roles(_roles),
       instances(_instances),