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:30 UTC
[mesos] 02/06: Removed `used` argument in `AgentProfile` in the
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 b04e8aa2b38613ae103e9d004854030d56ca388a
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Fri Oct 12 17:23:03 2018 -0700
Removed `used` argument in `AgentProfile` in the allocator benchmark.
Currently, it is not easy to initialize frameworks with used
resources in the fixture because when we specify the
`agentProfile`, no framework has been created yet.
Also, we currently do not have any use case for setting `used`
resources during the initialization. We can revisit this once
it becomes necessary.
Review: https://reviews.apache.org/r/69093
---
src/tests/hierarchical_allocator_benchmarks.cpp | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/tests/hierarchical_allocator_benchmarks.cpp b/src/tests/hierarchical_allocator_benchmarks.cpp
index b2fa614..65e9790 100644
--- a/src/tests/hierarchical_allocator_benchmarks.cpp
+++ b/src/tests/hierarchical_allocator_benchmarks.cpp
@@ -100,19 +100,19 @@ struct FrameworkProfile
struct AgentProfile
{
+ // TODO(mzhu): Add option to specify `used` resources. `used` resources
+ // requires the knowledge of `frameworkId` which currently is created
+ // during the initialization which is after the agent profile creation.
AgentProfile(const string& _name,
size_t _instances,
- const Resources& _resources,
- const hashmap<FrameworkID, Resources>& _usedResources)
+ const Resources& _resources)
: name(_name),
instances(_instances),
- resources(_resources),
- usedResources(_usedResources) {}
+ resources(_resources) {}
string name;
size_t instances;
Resources resources;
- hashmap<FrameworkID, Resources> usedResources;
};
@@ -233,7 +233,7 @@ protected:
AGENT_CAPABILITIES(),
None(),
agent.resources(),
- profile.usedResources);
+ {});
}
}
@@ -331,8 +331,7 @@ TEST_F(HierarchicalAllocations_BENCHMARK_TestBase, Allocations)
config.agentProfiles.push_back(AgentProfile(
"agent",
80,
- CHECK_NOTERROR(Resources::parse("cpus:64;mem:488000")),
- {}));
+ CHECK_NOTERROR(Resources::parse("cpus:64;mem:488000"))));
// Add framework profiles.