Hi all,
I want to check out the response time of provider APIs to a request for
retrieving the server list. I use the following piece of code to get it
and afterwards in order to search in the metadata e.g.
ComputeServiceContext context = ContextBuilder.newBuilder(provider)
.credentials(user, apiKey)
.buildView(ComputeServiceContext.class);
ComputeService computeService = context.getComputeService();
*//checkpoint 1**---startTime*
Set<? extends ComputeMetadata> localCS=computeService.listNodes();
*//checkpoint2---EndTime*
context.close();
List<? extends ComputeMetadata> NodeList = new ArrayList(localCS);
for (ComputeMetadata node : localCS) {
node.getName();
NodeMetadata metadata = computeService.getNodeMetadata(node.getId());
Are the check points included valid? From what i understand the initial
lines before checkpoint1 are just for preparation, while the actual call
is made in the computeService.listNodes() line. And afterwards (after
checkpoint2) the metadata in e.g.
computeService.getNodeMetadata(node.getId()) are taken from the local
response, right?
Cheers,
George
--
---------------------------
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com