orchestrationapi/mock/mysum, scoringmgr/mock/myscoring, scoringmgr/mock/mysum : not... 18/203218/1
authorjaehoon.hyun <jaehoon.hyun@samsung.com>
Thu, 11 Apr 2019 01:16:09 +0000 (10:16 +0900)
committerjaehoon.hyun <jaehoon.hyun@samsung.com>
Thu, 11 Apr 2019 01:16:09 +0000 (10:16 +0900)
mock library not used

Change-Id: I22665932f0632a72100c9026c3245d4e5aae669a

15 files changed:
src/orchestrationapi/mock/myscoring/libmyscoring.so.1.0.1 [deleted file]
src/orchestrationapi/mock/myscoring/myscoring.c [deleted file]
src/orchestrationapi/mock/myscoring/myscoring.conf [deleted file]
src/orchestrationapi/mock/mysum/libmysum [deleted file]
src/orchestrationapi/mock/mysum/libmysum.so [deleted file]
src/orchestrationapi/mock/mysum/libmysum.so.1.0.1 [deleted file]
src/orchestrationapi/mock/mysum/mysum.c [deleted file]
src/orchestrationapi/mock/mysum/mysum.conf [deleted file]
src/scoringmgr/mock/myscoring/libmyscoring.so.1.0.1 [deleted file]
src/scoringmgr/mock/myscoring/myscoring.c [deleted file]
src/scoringmgr/mock/myscoring/myscoring.conf [deleted file]
src/scoringmgr/mock/mysum/libmysum.so [deleted symlink]
src/scoringmgr/mock/mysum/libmysum.so.1.0.1 [deleted file]
src/scoringmgr/mock/mysum/mysum.c [deleted file]
src/scoringmgr/mock/mysum/mysum.conf [deleted file]

diff --git a/src/orchestrationapi/mock/myscoring/libmyscoring.so.1.0.1 b/src/orchestrationapi/mock/myscoring/libmyscoring.so.1.0.1
deleted file mode 100755 (executable)
index a736129..0000000
Binary files a/src/orchestrationapi/mock/myscoring/libmyscoring.so.1.0.1 and /dev/null differ
diff --git a/src/orchestrationapi/mock/myscoring/myscoring.c b/src/orchestrationapi/mock/myscoring/myscoring.c
deleted file mode 100755 (executable)
index 407fac2..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *******************************************************************************/
-/*
-$ gcc -fPIC -c myscoring.c && gcc -shared -o libmyscoring.so.1.0.1 myscoring.o
-$ ln -rs libmyscoring.so.1.0.1 libmyscoring.so
-*/
-
-#include <math.h>
-#include <assert.h>
-#include <stdio.h>
-
-#define CNT 6
-
-/*
-features :
--. there is using moving average, but it is not written code at service_provider.cpp
--. bandwidth is not meaning Mbps
-*/
-
-//network score mmDiscovery/service_provider.cpp
-static double networkScore(double n)
-{
-  return 1 / (8770 * pow(n, -0.9));
-}
-
-//cpu score mmDiscovery/service_provider.cpp
-static double cpuScore(double freq, double usage, double count)
-{
-  return ((1 / (5.66 * pow(freq, -0.66))) +
-          (1 / (3.22 * pow(usage, -0.241))) +
-          (1 / (4 * pow(count, -0.3)))) /
-         3;
-}
-
-//render score mmDiscovery/service_provider.cpp
-//https://github.com/Samsung/Castanets/blob/castanets_63/service_discovery_manager/Component/mmDiscovery/monitor_client.cpp
-static double renderingScore(double r)
-{
-  return (r < 0) ? 0 : 0.77 * pow(r, -0.43);
-}
-
-//============== INTERFACE API ==============
-double myscoring(double (*getResource)(const char *))
-{
-
-  printf("myscoring\n");
-  double score;
-
-  score = 0.0;
-  score += networkScore(getResource("network/bandwidth"));
-  score += cpuScore(getResource("cpu/freq"), getResource("cpu/usage"), getResource("cpu/count"));
-  score /= 2;
-  score += renderingScore(getResource("network/rtt"));
-
-  return score;
-}
-
-#define CNT 6
-
-double myscoring2(double (*getResource)(const char *))
-{
-
-  printf("myscoring\n");
-
-  double score;
-  const char *resourceNames[CNT] = {"cpu/usage", "cpu/count", "memory/free", "memory/available", "network/mbps", "network/bandwidth"};
-  double W[CNT] = {1.48271, 4.125421, 5.3381723, 9.194717234, 2.323, 1.123};
-  double resourceValues[CNT];
-
-  // double someResource;
-  // someResource = getResource("some/usage");
-  // assert(isnan(someResource));
-
-  for (int i = 0; i < CNT; i++)
-  {
-    resourceValues[i] = getResource(resourceNames[i]);
-    printf("resourceNames : %s %f\n", resourceNames[i], resourceValues[i]);
-  }
-
-  score = 0.0;
-  for (int i = 0; i < CNT; i++)
-  {
-    score += resourceValues[i] * W[i];
-  }
-
-  return score;
-}
diff --git a/src/orchestrationapi/mock/myscoring/myscoring.conf b/src/orchestrationapi/mock/myscoring/myscoring.conf
deleted file mode 100755 (executable)
index 9f8ee04..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Description of service that will be requested
-[Version]
-ConfVersion=v0.0                                        ; Version of Configuration file
-
-[ServiceInfo]
-ServiceName=ls                              ; Name of distributed service
-
-[ScoringMethod]
-LibFile=./libmyscoring.so                               ; Library file name
-FunctionName=myscoring
-
-[ResourceType]
-IntervalTimeMs=1000                                     ; Interval time of get resource
-MaxCount=10                                             ; Number of times
diff --git a/src/orchestrationapi/mock/mysum/libmysum b/src/orchestrationapi/mock/mysum/libmysum
deleted file mode 100644 (file)
index 0cccbfb..0000000
Binary files a/src/orchestrationapi/mock/mysum/libmysum and /dev/null differ
diff --git a/src/orchestrationapi/mock/mysum/libmysum.so b/src/orchestrationapi/mock/mysum/libmysum.so
deleted file mode 100644 (file)
index 0cccbfb..0000000
Binary files a/src/orchestrationapi/mock/mysum/libmysum.so and /dev/null differ
diff --git a/src/orchestrationapi/mock/mysum/libmysum.so.1.0.1 b/src/orchestrationapi/mock/mysum/libmysum.so.1.0.1
deleted file mode 100755 (executable)
index 63903f0..0000000
Binary files a/src/orchestrationapi/mock/mysum/libmysum.so.1.0.1 and /dev/null differ
diff --git a/src/orchestrationapi/mock/mysum/mysum.c b/src/orchestrationapi/mock/mysum/mysum.c
deleted file mode 100755 (executable)
index 46a765a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *******************************************************************************/
-
-/*
-$ gcc -fPIC -c mysum.c && gcc -shared -o libmysum.so.1.0.1 mysum.o
-$ ln -rs libmysum.so.1.0.1 libmysum.so
-*/
-
-int add(int a, int b)
-{
-  return a + b;
-}
\ No newline at end of file
diff --git a/src/orchestrationapi/mock/mysum/mysum.conf b/src/orchestrationapi/mock/mysum/mysum.conf
deleted file mode 100755 (executable)
index 6ea13f7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Description of service that will be requested
-[Version]
-ConfVersion=v0.0                                        ; Version of Configuration file
-
-[ServiceInfo]
-ServiceName=ls                              ; Name of distributed service
-
-[ScoringMethod]
-LibFile=./libmysum.so                               ; Library file name
-FunctionName=add
-
-[ResourceType]
-IntervalTimeMs=1000                                     ; Interval time of get resource
-MaxCount=10                                             ; Number of times
diff --git a/src/scoringmgr/mock/myscoring/libmyscoring.so.1.0.1 b/src/scoringmgr/mock/myscoring/libmyscoring.so.1.0.1
deleted file mode 100755 (executable)
index a736129..0000000
Binary files a/src/scoringmgr/mock/myscoring/libmyscoring.so.1.0.1 and /dev/null differ
diff --git a/src/scoringmgr/mock/myscoring/myscoring.c b/src/scoringmgr/mock/myscoring/myscoring.c
deleted file mode 100755 (executable)
index df21494..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *******************************************************************************/
-
-/*
-$ gcc -fPIC -c myscoring.c && gcc -shared -o libmyscoring.so.1.0.1 myscoring.o
-$ ln -rs libmyscoring.so.1.0.1 libmyscoring.so
-*/
-
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-
-#define CNT 6
-
-/*
-features :
--. there is using moving average, but it is not written code at
-service_provider.cpp
--. bandwidth is not meaning Mbps
-*/
-
-// network score mmDiscovery/service_provider.cpp
-static double networkScore(double n) { return 1 / (8770 * pow(n, -0.9)); }
-
-// cpu score mmDiscovery/service_provider.cpp
-static double cpuScore(double freq, double usage, double count)
-{
-  return ((1 / (5.66 * pow(freq, -0.66))) + (1 / (3.22 * pow(usage, -0.241))) +
-          (1 / (4 * pow(count, -0.3)))) /
-         3;
-}
-
-// render score mmDiscovery/service_provider.cpp
-// https://github.com/Samsung/Castanets/blob/castanets_63/service_discovery_manager/Component/mmDiscovery/monitor_client.cpp
-static double renderingScore(double r)
-{
-  return (r < 0) ? 0 : 0.77 * pow(r, -0.43);
-}
-
-//============== INTERFACE API ==============
-double myscoring(double (*getResource)(const char *))
-{
-  printf("myscoring\n");
-  double score;
-
-  score = 0.0;
-  score += networkScore(getResource("network/bandwidth"));
-  score += cpuScore(getResource("cpu/freq"), getResource("cpu/usage"),
-                    getResource("cpu/count"));
-  score /= 2;
-  score += renderingScore(getResource("network/rtt"));
-
-  return score;
-}
-
-#define CNT 6
-
-double myscoring2(double (*getResource)(const char *))
-{
-  printf("myscoring\n");
-
-  double score;
-  const char *resourceNames[CNT] = {"cpu/usage", "cpu/count",
-                                    "memory/free", "memory/available",
-                                    "network/mbps", "network/bandwidth"};
-  double W[CNT] = {1.48271, 4.125421, 5.3381723, 9.194717234, 2.323, 1.123};
-  double resourceValues[CNT];
-
-  // double someResource;
-  // someResource = getResource("some/usage");
-  // assert(isnan(someResource));
-
-  for (int i = 0; i < CNT; i++)
-  {
-    resourceValues[i] = getResource(resourceNames[i]);
-    printf("resourceNames : %s %f\n", resourceNames[i], resourceValues[i]);
-  }
-
-  score = 0.0;
-  for (int i = 0; i < CNT; i++)
-  {
-    score += resourceValues[i] * W[i];
-  }
-
-  return score;
-}
diff --git a/src/scoringmgr/mock/myscoring/myscoring.conf b/src/scoringmgr/mock/myscoring/myscoring.conf
deleted file mode 100755 (executable)
index 9f8ee04..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Description of service that will be requested
-[Version]
-ConfVersion=v0.0                                        ; Version of Configuration file
-
-[ServiceInfo]
-ServiceName=ls                              ; Name of distributed service
-
-[ScoringMethod]
-LibFile=./libmyscoring.so                               ; Library file name
-FunctionName=myscoring
-
-[ResourceType]
-IntervalTimeMs=1000                                     ; Interval time of get resource
-MaxCount=10                                             ; Number of times
diff --git a/src/scoringmgr/mock/mysum/libmysum.so b/src/scoringmgr/mock/mysum/libmysum.so
deleted file mode 120000 (symlink)
index 924134e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libmysum.so.1.0.1
\ No newline at end of file
diff --git a/src/scoringmgr/mock/mysum/libmysum.so.1.0.1 b/src/scoringmgr/mock/mysum/libmysum.so.1.0.1
deleted file mode 100755 (executable)
index 63903f0..0000000
Binary files a/src/scoringmgr/mock/mysum/libmysum.so.1.0.1 and /dev/null differ
diff --git a/src/scoringmgr/mock/mysum/mysum.c b/src/scoringmgr/mock/mysum/mysum.c
deleted file mode 100755 (executable)
index 1a9d6ca..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright 2019 Samsung Electronics All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language sgoverning permissions and
- * limitations under the License.
- *
- *******************************************************************************/
-
-/*
-$ gcc -fPIC -c mysum.c && gcc -shared -o libmysum.so.1.0.1 mysum.o
-$ ln -rs libmysum.so.1.0.1 libmysum.so
-*/
-
-int add(int a, int b) { return a + b; }
\ No newline at end of file
diff --git a/src/scoringmgr/mock/mysum/mysum.conf b/src/scoringmgr/mock/mysum/mysum.conf
deleted file mode 100755 (executable)
index 6ea13f7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# Description of service that will be requested
-[Version]
-ConfVersion=v0.0                                        ; Version of Configuration file
-
-[ServiceInfo]
-ServiceName=ls                              ; Name of distributed service
-
-[ScoringMethod]
-LibFile=./libmysum.so                               ; Library file name
-FunctionName=add
-
-[ResourceType]
-IntervalTimeMs=1000                                     ; Interval time of get resource
-MaxCount=10                                             ; Number of times