diff --git a/project/tasks/danano.go b/project/tasks/danano.go deleted file mode 100644 index 2b4ee72..0000000 --- a/project/tasks/danano.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - -) - -func exec_task(arg string) string{ - - response := "" + arg - - return response -} \ No newline at end of file diff --git a/project/tasks/double.go b/project/tasks/double.go new file mode 100644 index 0000000..56f32a9 --- /dev/null +++ b/project/tasks/double.go @@ -0,0 +1,24 @@ +package main + +import ( + "encoding/json" +) + +type Request struct { + Data int + Name string +} + +func exec_task(arg string) string{ + + req := Request{} + + json.Unmarshal([]byte(arg), &req) + + // double the data field + req.Data = req.Data * 2 + + // return the json string + json, _ := json.Marshal(req) + return string(json) +} \ No newline at end of file diff --git a/project/tasks/task1.go b/project/tasks/task1.go deleted file mode 100644 index 88dfe7e..0000000 --- a/project/tasks/task1.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - -) - -func exec_task(arg string) string{ - - response := "Ciao danano " + arg - - return response -} \ No newline at end of file diff --git a/project/workflow.yaml b/project/workflow.yaml index a404e56..0046f7f 100644 --- a/project/workflow.yaml +++ b/project/workflow.yaml @@ -1,47 +1,101 @@ project_name: Test tasks: - - name: Data Stream test 1 + - name: Data Stream double value type: processor_nats - code: task1.go + code: double.go targets: - cloud - source_topic: test_source - dest_topic: test_destination - component_name: data_aggregation_test + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test version: 1.0.0 - - name: Aiutatemi - type: producer_nats - code: danano.go + + - name: Data Stream double value 2 + type: processor_nats + code: double.go targets: - - edge - source_topic: test - dest_topic: test_source - component_name: test_producer_help1 + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test2 version: 1.0.0 - - name: Aiutatemi - type: producer_nats - code: danano.go + + - name: Data Stream double value 3 + type: processor_nats + code: double.go targets: - - edge - source_topic: test - dest_topic: test_source - component_name: test_producer_help2 + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test3 version: 1.0.0 - - name: Aiutatemi - type: producer_nats - code: danano.go + + - name: Data Stream double value 4 + type: processor_nats + code: double.go targets: - - edge - source_topic: test - dest_topic: test_source - component_name: test_producer_help3 + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test4 version: 1.0.0 - - name: Aiutatemi - type: producer_nats - code: danano.go + + - name: Data Stream double value 5 + type: processor_nats + code: double.go targets: - - edge - source_topic: test - dest_topic: test_source - component_name: test_producer_help4 + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test5 + version: 1.0.0 + + - name: Data Stream double value 11 + type: processor_nats + code: double.go + targets: + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test11 + version: 1.0.0 + + - name: Data Stream double value 12 + type: processor_nats + code: double.go + targets: + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test12 + version: 1.0.0 + + - name: Data Stream double value 13 + type: processor_nats + code: double.go + targets: + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test13 + version: 1.0.0 + + - name: Data Stream double value 14 + type: processor_nats + code: double.go + targets: + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test14 + version: 1.0.0 + + - name: Data Stream double value 15 + type: processor_nats + code: double.go + targets: + - cloud + source_topic: test_source_data + dest_topic: ttest_dest_data + component_name: data_double_test15 version: 1.0.0 \ No newline at end of file diff --git a/res/build_time_boxplot.png b/res/build_time_boxplot.png new file mode 100644 index 0000000..e3ce9af Binary files /dev/null and b/res/build_time_boxplot.png differ diff --git a/res/deploy_time_boxplot.png b/res/deploy_time_boxplot.png new file mode 100644 index 0000000..b798c66 Binary files /dev/null and b/res/deploy_time_boxplot.png differ diff --git a/res/gen_time_boxplot.png b/res/gen_time_boxplot.png new file mode 100644 index 0000000..b0003e0 Binary files /dev/null and b/res/gen_time_boxplot.png differ