You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by wi...@apache.org on 2020/04/22 12:58:41 UTC

[incubator-streampipes] 01/02: remove evaluation inserts

This is an automated email from the ASF dual-hosted git repository.

wiener pushed a commit to branch edge-extensions
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git

commit 7f6b869ac54561b655935744223625ca3f90ad70
Author: Patrick Wiener <wi...@fzi.de>
AuthorDate: Wed Apr 15 16:37:01 2020 +0200

    remove evaluation inserts
---
 .../rest/impl/PipelineWithUserResource.java        | 35 ----------------------
 1 file changed, 35 deletions(-)

diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineWithUserResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineWithUserResource.java
index d7c9806..61a2d1c 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineWithUserResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineWithUserResource.java
@@ -58,10 +58,6 @@ public class PipelineWithUserResource extends AbstractRestInterface implements I
 
     private static final Logger logger = LoggerFactory.getLogger(PipelineWithUserResource.class);
 
-    private static ArrayList<Integer> startMeasures = new ArrayList<>();
-    private static ArrayList<Integer> stopMeasures = new ArrayList<>();
-    private static int MAX_TEST_RUN = 10;
-
     @Override
     public Response getAvailable(String username) {
         // TODO Auto-generated method stub
@@ -145,25 +141,10 @@ public class PipelineWithUserResource extends AbstractRestInterface implements I
     public Response start(@PathParam("username") String username, @PathParam("pipelineId") String pipelineId) {
         try {
 
-            long start = System.currentTimeMillis();
-
             Pipeline pipeline = getPipelineStorage()
                     .getPipeline(pipelineId);
             PipelineOperationStatus status = Operations.startPipeline(pipeline);
 
-            // TODO: PERFORMANCE_TEST delete afterwards
-            int delta = (int) (System.currentTimeMillis() - start);
-
-            startMeasures.add(delta);
-            logger.info("add new measure {}", startMeasures);
-            if (startMeasures.size() == MAX_TEST_RUN) {
-                IntSummaryStatistics s = startMeasures
-                        .stream()
-                        .mapToInt((x) -> x)
-                        .summaryStatistics();
-                logger.info("start test results over {} test runs: {}", String.valueOf(MAX_TEST_RUN), s.toString());
-            }
-
             return ok(status);
         } catch (Exception e) {
             e.printStackTrace();
@@ -177,25 +158,9 @@ public class PipelineWithUserResource extends AbstractRestInterface implements I
     @GsonWithIds
     public Response stop(@PathParam("username") String username, @PathParam("pipelineId") String pipelineId) {
 
-        long start = System.currentTimeMillis();
-
         logger.info("User: " + username + " stopped pipeline: " + pipelineId);
         PipelineManagement pm = new PipelineManagement();
 
-
-        // TODO: PERFORMANCE_TEST delete afterwards
-        int delta = (int) (System.currentTimeMillis() - start);
-
-        stopMeasures.add(delta);
-        logger.info("add new stop measure {}", stopMeasures);
-        if (stopMeasures.size() == MAX_TEST_RUN) {
-            IntSummaryStatistics s = stopMeasures
-                    .stream()
-                    .mapToInt((x) -> x)
-                    .summaryStatistics();
-            logger.info("stop test results over {} test runs: {}", String.valueOf(MAX_TEST_RUN), s.toString());
-        }
-
         return pm.stopPipeline(pipelineId);
     }