summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
f8c4cb6)
Issue-ID: CPS-1509
Change-Id: I2eded9a23b56f5263591c710c7a707cf281f93d7
Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
package org.onap.cps.rest.controller;
package org.onap.cps.rest.controller;
+import io.micrometer.core.annotation.Timed;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
+ @Timed(value = "cps.data.controller.datanode.get.v1",
+ description = "Time taken to get data node")
public ResponseEntity<Object> getNodeByDataspaceAndAnchor(final String dataspaceName,
final String anchorName, final String xpath, final Boolean includeDescendants) {
final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
public ResponseEntity<Object> getNodeByDataspaceAndAnchor(final String dataspaceName,
final String anchorName, final String xpath, final Boolean includeDescendants) {
final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
+ @Timed(value = "cps.data.controller.datanode.get.v2",
+ description = "Time taken to get data node")
public ResponseEntity<Object> getNodeByDataspaceAndAnchorV2(final String dataspaceName, final String anchorName,
final String xpath,
final String fetchDescendantsOptionAsString) {
public ResponseEntity<Object> getNodeByDataspaceAndAnchorV2(final String dataspaceName, final String anchorName,
final String xpath,
final String fetchDescendantsOptionAsString) {
package org.onap.cps.rest.controller;
package org.onap.cps.rest.controller;
+import io.micrometer.core.annotation.Timed;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
private final PrefixResolver prefixResolver;
@Override
private final PrefixResolver prefixResolver;
@Override
+ @Timed(value = "cps.data.controller.datanode.query.v1",
+ description = "Time taken to query data nodes")
public ResponseEntity<Object> getNodesByDataspaceAndAnchorAndCpsPath(final String dataspaceName,
final String anchorName, final String cpsPath, final Boolean includeDescendants) {
final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
public ResponseEntity<Object> getNodesByDataspaceAndAnchorAndCpsPath(final String dataspaceName,
final String anchorName, final String cpsPath, final Boolean includeDescendants) {
final FetchDescendantsOption fetchDescendantsOption = Boolean.TRUE.equals(includeDescendants)
+ @Timed(value = "cps.data.controller.datanode.query.v2",
+ description = "Time taken to query data nodes")
public ResponseEntity<Object> getNodesByDataspaceAndAnchorAndCpsPathV2(final String dataspaceName,
final String anchorName, final String cpsPath, final String fetchDescendantsOptionAsString) {
final FetchDescendantsOption fetchDescendantsOption =
public ResponseEntity<Object> getNodesByDataspaceAndAnchorAndCpsPathV2(final String dataspaceName,
final String anchorName, final String cpsPath, final String fetchDescendantsOptionAsString) {
final FetchDescendantsOption fetchDescendantsOption =
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSet.Builder;
+import io.micrometer.core.annotation.Timed;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
private final JsonObjectMapper jsonObjectMapper;
private final SessionManager sessionManager;
private final JsonObjectMapper jsonObjectMapper;
private final SessionManager sessionManager;
- private static final String REG_EX_FOR_OPTIONAL_LIST_INDEX = "(\\[@[\\s\\S]+?]){0,1})";
+ private static final String REG_EX_FOR_OPTIONAL_LIST_INDEX = "(\\[@[\\s\\S]+?])?)";
@Override
public void addChildDataNode(final String dataspaceName, final String anchorName, final String parentNodeXpath,
@Override
public void addChildDataNode(final String dataspaceName, final String anchorName, final String parentNodeXpath,
+ @Timed(value = "cps.data.persistence.service.datanode.get",
+ description = "Time taken to get a data node")
public Collection<DataNode> getDataNodes(final String dataspaceName, final String anchorName,
final String xpath,
final FetchDescendantsOption fetchDescendantsOption) {
public Collection<DataNode> getDataNodes(final String dataspaceName, final String anchorName,
final String xpath,
final FetchDescendantsOption fetchDescendantsOption) {
+ @Timed(value = "cps.data.persistence.service.datanode.batch.get",
+ description = "Time taken to get data nodes")
public Collection<DataNode> getDataNodesForMultipleXpaths(final String dataspaceName, final String anchorName,
final Collection<String> xpaths,
final FetchDescendantsOption fetchDescendantsOption) {
public Collection<DataNode> getDataNodesForMultipleXpaths(final String dataspaceName, final String anchorName,
final Collection<String> xpaths,
final FetchDescendantsOption fetchDescendantsOption) {
+ @Timed(value = "cps.data.persistence.service.datanode.query",
+ description = "Time taken to query data nodes")
public List<DataNode> queryDataNodes(final String dataspaceName, final String anchorName, final String cpsPath,
final FetchDescendantsOption fetchDescendantsOption) {
final DataspaceEntity dataspaceEntity = dataspaceRepository.getByName(dataspaceName);
public List<DataNode> queryDataNodes(final String dataspaceName, final String anchorName, final String cpsPath,
final FetchDescendantsOption fetchDescendantsOption) {
final DataspaceEntity dataspaceEntity = dataspaceRepository.getByName(dataspaceName);
package org.onap.cps.api.impl;
package org.onap.cps.api.impl;
+import io.micrometer.core.annotation.Timed;
import java.util.Collection;
import lombok.RequiredArgsConstructor;
import org.onap.cps.api.CpsQueryService;
import java.util.Collection;
import lombok.RequiredArgsConstructor;
import org.onap.cps.api.CpsQueryService;
private final CpsValidator cpsValidator;
@Override
private final CpsValidator cpsValidator;
@Override
+ @Timed(value = "cps.data.service.datanode.query",
+ description = "Time taken to query data nodes")
public Collection<DataNode> queryDataNodes(final String dataspaceName, final String anchorName,
final String cpsPath, final FetchDescendantsOption fetchDescendantsOption) {
cpsValidator.validateNameCharacters(dataspaceName, anchorName);
public Collection<DataNode> queryDataNodes(final String dataspaceName, final String anchorName,
final String cpsPath, final FetchDescendantsOption fetchDescendantsOption) {
cpsValidator.validateNameCharacters(dataspaceName, anchorName);