Search in sources :

Example 31 with ServiceStat

use of com.vmware.xenon.common.ServiceStats.ServiceStat in project photon-model by vmware.

the class StatsCollectionTaskServiceTest method testStatsCollection.

private void testStatsCollection(boolean testOnCluster) throws Throwable {
    VerificationHost metricHost = null;
    if (testOnCluster) {
        metricHost = this.setupMetricHost();
    }
    // Use this.host if metricHost is null.
    VerificationHost verificationHost = (metricHost == null ? this.host : metricHost);
    // create a metric host
    // create a compute description for all the computes
    ComputeDescription cDesc = new ComputeDescription();
    cDesc.name = UUID.randomUUID().toString();
    cDesc.statsAdapterReference = UriUtils.buildUri(this.host, MockStatsAdapter.SELF_LINK);
    ComputeDescription descReturnState = postServiceSynchronously(ComputeDescriptionService.FACTORY_LINK, cDesc, ComputeDescription.class);
    // create multiple computes
    ComputeState computeState = new ComputeState();
    computeState.name = UUID.randomUUID().toString();
    computeState.descriptionLink = descReturnState.documentSelfLink;
    List<String> computeLinks = new ArrayList<>(this.numResources);
    for (int i = 0; i < this.numResources; i++) {
        ComputeState res = postServiceSynchronously(ComputeService.FACTORY_LINK, computeState, ComputeState.class);
        computeLinks.add(res.documentSelfLink);
    }
    // create a resource pool including all the created computes
    ResourcePoolState rpState = new ResourcePoolState();
    rpState.name = UUID.randomUUID().toString();
    rpState.properties = EnumSet.of(ResourcePoolProperty.ELASTIC);
    rpState.query = Query.Builder.create().addKindFieldClause(ComputeState.class).addInClause(ServiceDocument.FIELD_NAME_SELF_LINK, computeLinks).build();
    ResourcePoolState rpReturnState = postServiceSynchronously(ResourcePoolService.FACTORY_LINK, rpState, ResourcePoolState.class);
    // create a stats collection scheduler task
    StatsCollectionTaskState statCollectionState = new StatsCollectionTaskState();
    statCollectionState.resourcePoolLink = rpReturnState.documentSelfLink;
    statCollectionState.options = EnumSet.of(TaskOption.SELF_DELETE_ON_COMPLETION);
    ScheduledTaskState statsCollectionTaskState = new ScheduledTaskState();
    statsCollectionTaskState.factoryLink = StatsCollectionTaskService.FACTORY_LINK;
    statsCollectionTaskState.initialStateJson = Utils.toJson(statCollectionState);
    statsCollectionTaskState.intervalMicros = TimeUnit.SECONDS.toMicros(2);
    statsCollectionTaskState = postServiceSynchronously(ScheduledTaskService.FACTORY_LINK, statsCollectionTaskState, ScheduledTaskState.class);
    ServiceDocumentQueryResult res = this.host.getFactoryState(UriUtils.buildExpandLinksQueryUri(UriUtils.buildUri(this.host, ScheduledTaskService.FACTORY_LINK)));
    assertTrue(res.documents.size() > 0);
    // the last successful collection time should be populated as an in memory stat.
    for (int i = 0; i < this.numResources; i++) {
        String statsUriPath = UriUtils.buildUriPath(computeLinks.get(i), ServiceHost.SERVICE_URI_SUFFIX_STATS);
        this.host.waitFor("Error waiting for in memory stats", () -> {
            ServiceStats resStats = getServiceSynchronously(statsUriPath, ServiceStats.class);
            boolean returnStatus = false;
            for (ServiceStat stat : resStats.entries.values()) {
                if (stat.latestValue > 0) {
                    returnStatus = true;
                    break;
                }
            }
            return returnStatus;
        });
    }
    host.log(Level.INFO, "Successfully verified that all the last collection time is available in memory.");
    // persisted at a per metric level along with the last collection run time
    for (String computeLink : computeLinks) {
        ResourceMetrics metric = getResourceMetrics(verificationHost, computeLink, MockStatsAdapter.KEY_1);
        assertNotNull("The resource metric for" + MockStatsAdapter.KEY_1 + " should not be null ", metric);
        assertEquals(metric.entries.size(), 1);
        assertEquals(metric.customProperties.get("prop1"), "val1");
        ResourceMetrics metric2 = getResourceMetrics(verificationHost, computeLink, MockStatsAdapter.KEY_2);
        assertNotNull("The resource metric for" + MockStatsAdapter.KEY_2 + "should not be null ", metric2);
        assertEquals(metric2.entries.size(), 1);
        String lastSuccessfulRunMetricKey = UriUtils.getLastPathSegment(MockStatsAdapter.SELF_LINK) + StatsUtil.SEPARATOR + PhotonModelConstants.LAST_SUCCESSFUL_STATS_COLLECTION_TIME;
        ResourceMetrics metricLastRun = getResourceMetrics(verificationHost, computeLink, lastSuccessfulRunMetricKey);
        assertNotNull("The resource metric for" + lastSuccessfulRunMetricKey + " should not be null ", metricLastRun);
    }
    host.log(Level.INFO, "Successfully verified that the required resource metrics are persisted in the resource metrics table");
    // Verify sorted order of the metrics versions by timestamp
    for (String computeLink : computeLinks) {
        // get all versions
        QueryTask qt = QueryTask.Builder.createDirectTask().addOption(QueryOption.EXPAND_CONTENT).addOption(QueryOption.SORT).orderAscending(ServiceDocument.FIELD_NAME_SELF_LINK, TypeName.STRING).setQuery(Query.Builder.create().addKindFieldClause(ResourceMetrics.class).addFieldClause(ServiceDocument.FIELD_NAME_SELF_LINK, UriUtils.buildUriPath(ResourceMetricsService.FACTORY_LINK, UriUtils.getLastPathSegment(computeLink)), MatchType.PREFIX).addRangeClause(QuerySpecification.buildCompositeFieldName(ResourceMetrics.FIELD_NAME_ENTRIES, MockStatsAdapter.KEY_1), NumericRange.createDoubleRange(Double.MIN_VALUE, Double.MAX_VALUE, true, true)).build()).build();
        verificationHost.createQueryTaskService(qt, false, true, qt, null);
        ResourceMetrics prevMetric = null;
        for (String documentLink : qt.results.documentLinks) {
            ResourceMetrics metric = Utils.fromJson(qt.results.documents.get(documentLink), ResourceMetrics.class);
            if (prevMetric == null) {
                prevMetric = metric;
                continue;
            }
            assertTrue(prevMetric.timestampMicrosUtc < metric.timestampMicrosUtc);
        }
    }
    // verify that the aggregation tasks have been deleted
    this.host.waitFor("Timeout waiting for task to expire", () -> {
        ServiceDocumentQueryResult collectRes = this.host.getFactoryState(UriUtils.buildUri(this.host, StatsCollectionTaskService.FACTORY_LINK));
        if (collectRes.documentLinks.size() == 0) {
            return true;
        }
        return false;
    });
    if (testOnCluster) {
        this.cleanUpMetricHost(metricHost);
    }
}
Also used : ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) ResourcePoolState(com.vmware.photon.controller.model.resources.ResourcePoolService.ResourcePoolState) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) ArrayList(java.util.ArrayList) VerificationHost(com.vmware.xenon.common.test.VerificationHost) ServiceDocumentQueryResult(com.vmware.xenon.common.ServiceDocumentQueryResult) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) ResourceMetrics(com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics) ServiceStats(com.vmware.xenon.common.ServiceStats) QueryTask(com.vmware.xenon.services.common.QueryTask) ScheduledTaskState(com.vmware.photon.controller.model.tasks.ScheduledTaskService.ScheduledTaskState) StatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.StatsCollectionTaskService.StatsCollectionTaskState) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState)

Example 32 with ServiceStat

use of com.vmware.xenon.common.ServiceStats.ServiceStat in project photon-model by vmware.

the class AzureStatsService method getComputeHostStats.

/**
 * Get metrics at the compute host level.
 * @param statsData
 */
private void getComputeHostStats(AzureStatsDataHolder statsData) {
    ComputeStatsRequest statsRequest = statsData.statsRequest;
    Collection<Operation> opCollection = new ArrayList<>();
    Operation computeStatsOp = Operation.createPatch(UriUtils.buildUri(getHost(), AzureUriPaths.AZURE_COMPUTE_HOST_STATS_GATHERER)).setBody(statsRequest).setReferer(getUri());
    opCollection.add(computeStatsOp);
    Operation storageStatsOp = Operation.createPatch(UriUtils.buildUri(getHost(), AzureUriPaths.AZURE_COMPUTE_HOST_STORAGE_STATS_GATHERER)).setBody(statsRequest).setReferer(getUri());
    opCollection.add(storageStatsOp);
    OperationJoin.create(opCollection).setCompletion((ops, exs) -> {
        if (exs != null) {
            exs.values().forEach(ex -> logWarning(() -> String.format("Error: %s", ex.getMessage())));
            sendFailurePatch(statsData, exs.values().iterator().next());
            return;
        }
        SingleResourceStatsCollectionTaskState statsResponse = new SingleResourceStatsCollectionTaskState();
        statsResponse.taskStage = SingleResourceTaskCollectionStage.valueOf(statsData.statsRequest.nextStage);
        statsResponse.statsList = new ArrayList<>();
        statsResponse.statsAdapterReference = UriUtils.buildUri(getHost(), SELF_LINK);
        for (Map.Entry<Long, Operation> op : ops.entrySet()) {
            ComputeStatsResponse.ComputeStats stats = op.getValue().getBody(ComputeStatsResponse.ComputeStats.class);
            if (stats != null) {
                if (statsResponse.statsList == null || statsResponse.statsList.size() == 0) {
                    statsResponse.statsList.add(stats);
                } else {
                    for (Map.Entry<String, List<ServiceStat>> entry : stats.statValues.entrySet()) {
                        statsResponse.statsList.get(0).statValues.put(entry.getKey(), entry.getValue());
                    }
                }
            }
        }
        this.sendRequest(Operation.createPatch(statsData.statsRequest.taskReference).setBody(statsResponse));
        logFine(() -> "Finished collection of compute host stats");
    }).sendWith(this);
}
Also used : AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ComputeStatsResponse(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) StatelessService(com.vmware.xenon.common.StatelessService) Collection(java.util.Collection) Operation(com.vmware.xenon.common.Operation) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) ArrayList(java.util.ArrayList) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState) Consumer(java.util.function.Consumer) List(java.util.List) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) Map(java.util.Map) UriUtils(com.vmware.xenon.common.UriUtils) URI(java.net.URI) OperationJoin(com.vmware.xenon.common.OperationJoin) SingleResourceTaskCollectionStage(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceTaskCollectionStage) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) ArrayList(java.util.ArrayList) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState) Operation(com.vmware.xenon.common.Operation)

Example 33 with ServiceStat

use of com.vmware.xenon.common.ServiceStats.ServiceStat in project photon-model by vmware.

the class AWSCostStatsService method createStatsForResource.

private ComputeStats createStatsForResource(String resourceLink, AwsResourceDetailDto resourceDetails) {
    ComputeStats resourceStats = new ComputeStats();
    resourceStats.statValues = new ConcurrentSkipListMap<>();
    resourceStats.computeLink = resourceLink;
    List<ServiceStat> resourceServiceStats = new ArrayList<>();
    String normalizedStatKeyValue = AWSStatsNormalizer.getNormalizedStatKeyValue(AWSConstants.COST);
    for (Entry<Long, Double> cost : resourceDetails.directCosts.entrySet()) {
        ServiceStat resourceStat = createStat(AWSStatsNormalizer.getNormalizedUnitValue(DIMENSION_CURRENCY_VALUE), normalizedStatKeyValue, cost.getKey(), cost.getValue());
        resourceServiceStats.add(resourceStat);
    }
    resourceStats.statValues.put(normalizedStatKeyValue, resourceServiceStats);
    // Create a stat to represent how many hours a resource ran as reserve instance
    String normalizedReservedInstanceStatKey = AWSStatsNormalizer.getNormalizedStatKeyValue(AWSConstants.RESERVED_INSTANCE_DURATION);
    List<ServiceStat> reservedInstanceStats = new ArrayList<>();
    for (Entry<Long, Double> entry : resourceDetails.hoursAsReservedPerDay.entrySet()) {
        ServiceStat resourceStat = createStat(AWSStatsNormalizer.getNormalizedUnitValue(AWSConstants.UNIT_HOURS), normalizedReservedInstanceStatKey, entry.getKey(), entry.getValue());
        reservedInstanceStats.add(resourceStat);
    }
    logFine(() -> String.format("Reserved Instances stats count for %s is %d", resourceLink, reservedInstanceStats.size()));
    if (reservedInstanceStats.size() > 0) {
        resourceStats.statValues.put(normalizedReservedInstanceStatKey, reservedInstanceStats);
    }
    return resourceStats;
}
Also used : ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) ArrayList(java.util.ArrayList)

Example 34 with ServiceStat

use of com.vmware.xenon.common.ServiceStats.ServiceStat in project photon-model by vmware.

the class AzureCostStatsService method createComputeStatsForResource.

private ComputeStats createComputeStatsForResource(String resourceLink, AzureResource azureResource) {
    String currencyUnit = AzureStatsNormalizer.getNormalizedUnitValue(AzureCostConstants.DEFAULT_CURRENCY_VALUE);
    String costStatName = AzureStatsNormalizer.getNormalizedStatKeyValue(AzureCostConstants.COST);
    ComputeStats resourceComputeStats = new ComputeStats();
    resourceComputeStats.statValues = new HashMap<>();
    resourceComputeStats.computeLink = resourceLink;
    azureResource.cost.forEach((dayOfMonth, cost) -> {
        List<ServiceStat> vmCostStats = new ArrayList<>();
        ServiceStat vmCostStat = AzureCostHelper.createServiceStat(costStatName, cost, currencyUnit, dayOfMonth);
        vmCostStats.add(vmCostStat);
        resourceComputeStats.statValues.put(costStatName, vmCostStats);
    });
    return resourceComputeStats;
}
Also used : ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) ArrayList(java.util.ArrayList)

Example 35 with ServiceStat

use of com.vmware.xenon.common.ServiceStats.ServiceStat in project photon-model by vmware.

the class AzureCostStatsService method createServiceStatsForSubscription.

private void createServiceStatsForSubscription(Context context, AzureSubscription subscription) {
    Consumer<List<ComputeState>> serviceStatsProcessor = (subscriptionComputeStates) -> subscriptionComputeStates.forEach(subscriptionComputeState -> {
        List<ComputeStats> resourceStatsList = new ArrayList<>();
        ComputeStats subscriptionStats = new ComputeStats();
        subscriptionStats.statValues = new ConcurrentHashMap<>();
        subscriptionStats.computeLink = subscriptionComputeState.documentSelfLink;
        subscriptionStats.addCustomProperty(PhotonModelConstants.DOES_CONTAIN_SERVICE_STATS, Boolean.TRUE.toString());
        for (AzureService service : subscription.getServices().values()) {
            List<ComputeStats> resourcesCostStats = new ArrayList<>();
            Map<String, List<ServiceStat>> statsForAzureService = createStatsForAzureService(context, service, resourcesCostStats);
            subscriptionStats.statValues.putAll(statsForAzureService);
            resourceStatsList.addAll(resourcesCostStats);
        }
        if (!subscriptionStats.statValues.isEmpty()) {
            context.statsResponse.statsList.add(subscriptionStats);
        }
        if (!resourceStatsList.isEmpty()) {
            context.statsResponse.statsList.addAll(resourceStatsList);
        }
    });
    processSubscriptionStats(context, subscription, serviceStatsProcessor);
}
Also used : AzureCostConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureCostConstants) AzureStatsNormalizer(com.vmware.photon.controller.model.adapters.azure.utils.AzureStatsNormalizer) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) Arrays(java.util.Arrays) DateTimeZone(org.joda.time.DateTimeZone) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) QueryTask(com.vmware.xenon.services.common.QueryTask) ServiceDocument(com.vmware.xenon.common.ServiceDocument) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) StringUtils(org.apache.commons.lang3.StringUtils) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) EndpointAllocationTaskService(com.vmware.photon.controller.model.tasks.EndpointAllocationTaskService) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState) Utils(com.vmware.xenon.common.Utils) BufferedSink(okio.BufferedSink) Map(java.util.Map) AzureService(com.vmware.photon.controller.model.adapters.azure.model.cost.AzureService) URI(java.net.URI) AzureSubscriptionsEnumerationRequest(com.vmware.photon.controller.model.adapters.azure.ea.enumeration.AzureSubscriptionsEnumerationService.AzureSubscriptionsEnumerationRequest) Builder(com.vmware.xenon.services.common.QueryTask.Builder) Path(java.nio.file.Path) EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) Interceptor(okhttp3.Interceptor) ComputeStatsResponse(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse) AzureDetailedBillHandler(com.vmware.photon.controller.model.adapters.azure.ea.utils.AzureDetailedBillHandler) Request(okhttp3.Request) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) StatelessService(com.vmware.xenon.common.StatelessService) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) OldEaSummarizedBillElement(com.vmware.photon.controller.model.adapters.azure.model.cost.OldEaSummarizedBillElement) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) Set(java.util.Set) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) AzureSubscriptionsEnumerationService(com.vmware.photon.controller.model.adapters.azure.ea.enumeration.AzureSubscriptionsEnumerationService) AzureCostHelper(com.vmware.photon.controller.model.adapters.azure.ea.utils.AzureCostHelper) List(java.util.List) Stream(java.util.stream.Stream) UriUtils(com.vmware.xenon.common.UriUtils) Entry(java.util.Map.Entry) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) INTERNAL_REQUEST_TIMEOUT_SECONDS(com.vmware.photon.controller.model.adapters.azure.constants.AzureCostConstants.INTERNAL_REQUEST_TIMEOUT_SECONDS) ResourceMetrics(com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics) SingleResourceTaskCollectionStage(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceTaskCollectionStage) Okio(okio.Okio) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) OperationContext(com.vmware.xenon.common.OperationContext) AtomicDouble(com.google.common.util.concurrent.AtomicDouble) HashMap(java.util.HashMap) Function(java.util.function.Function) AzureResource(com.vmware.photon.controller.model.adapters.azure.model.cost.AzureResource) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) EndpointConfigRequest(com.vmware.photon.controller.model.adapterapi.EndpointConfigRequest) Query(com.vmware.xenon.services.common.QueryTask.Query) CollectionUtils(org.apache.commons.collections.CollectionUtils) EaBillLinkElement(com.vmware.photon.controller.model.adapters.azure.model.cost.EaBillLinkElement) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) AUTO_DISCOVERED_ENTITY(com.vmware.photon.controller.model.constants.PhotonModelConstants.AUTO_DISCOVERED_ENTITY) EaBillLinks(com.vmware.photon.controller.model.adapters.azure.model.cost.EaBillLinks) BiConsumer(java.util.function.BiConsumer) Response(okhttp3.Response) EndpointType(com.vmware.photon.controller.model.constants.PhotonModelConstants.EndpointType) Call(okhttp3.Call) Callback(okhttp3.Callback) AzureSubscription(com.vmware.photon.controller.model.adapters.azure.model.cost.AzureSubscription) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) ExecutorService(java.util.concurrent.ExecutorService) OldApi(com.vmware.photon.controller.model.adapters.azure.model.cost.OldApi) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ServiceErrorResponse(com.vmware.xenon.common.ServiceErrorResponse) Files(java.nio.file.Files) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) TypeName(com.vmware.xenon.common.ServiceDocumentDescription.TypeName) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) File(java.io.File) QueryTop(com.vmware.photon.controller.model.query.QueryUtils.QueryTop) BillParsingStatus(com.vmware.photon.controller.model.adapters.azure.model.cost.BillParsingStatus) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) LocalDate(org.joda.time.LocalDate) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap) OkHttpClient(okhttp3.OkHttpClient) Paths(java.nio.file.Paths) ClusterUtil(com.vmware.photon.controller.model.util.ClusterUtil) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) ServiceDocumentDescription(com.vmware.xenon.common.ServiceDocumentDescription) Comparator(java.util.Comparator) QuerySpecification(com.vmware.xenon.services.common.QueryTask.QuerySpecification) OperationJoin(com.vmware.xenon.common.OperationJoin) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) AzureService(com.vmware.photon.controller.model.adapters.azure.model.cost.AzureService) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList)

Aggregations

ServiceStat (com.vmware.xenon.common.ServiceStats.ServiceStat)37 ArrayList (java.util.ArrayList)21 ComputeStats (com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats)16 SingleResourceStatsCollectionTaskState (com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState)15 List (java.util.List)11 Map (java.util.Map)11 ComputeStatsRequest (com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest)10 ResourceMetrics (com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics)10 ComputeState (com.vmware.photon.controller.model.resources.ComputeService.ComputeState)9 Operation (com.vmware.xenon.common.Operation)9 QueryTask (com.vmware.xenon.services.common.QueryTask)9 HashMap (java.util.HashMap)9 ServiceStats (com.vmware.xenon.common.ServiceStats)8 UriUtils (com.vmware.xenon.common.UriUtils)8 URI (java.net.URI)8 PhotonModelConstants (com.vmware.photon.controller.model.constants.PhotonModelConstants)7 ComputeStateWithDescription (com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription)7 ServiceDocument (com.vmware.xenon.common.ServiceDocument)7 StatelessService (com.vmware.xenon.common.StatelessService)7 Utils (com.vmware.xenon.common.Utils)7