The listNodes method can do more than one call, depending on the provider.
Some providers just return partial data when listing, some return the
entire node data. In the former, jclouds will perform a get operation on
each returned node to return a list of fully populated objects, so the
metrics could be biased depending on the provider.

Are you trying to measure how much it takes to jclouds to get the list of
nodes or are you trying to measure how fast the provider api responds? You
can do the latter by configuring an interceptor at the http driver level.

On 31 March 2015 at 20:07, George Kousiouris <[email protected]> wrote:

>
> 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
>
> --
> ---------------------------
>
>
>
>
> ------------------------------
>    <http://www.avast.com/>
>
> This email is free from viruses and malware because avast! Antivirus
> <http://www.avast.com/> protection is active.
>
>

Reply via email to