Skip to content

Commit 00d2d18

Browse files
committed
Changed JSON trace parser to include struct instead of interface
Signed-off-by: aryans1204 <arshar1204@gmail.com> Fixed loader e2e tests Signed-off-by: aryans1204 <arshar1204@gmail.com>
1 parent 42016b7 commit 00d2d18

File tree

7 files changed

+59
-1037
lines changed

7 files changed

+59
-1037
lines changed

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
run: go run cmd/loader.go --config pkg/config/test_vswarm_config.json
8787

8888
- name: Check vSwarm output
89-
run: test -f "data/out/experiment_duration_2.csv" && test $(cat data/out/experiment_duration_2.csv | wc -l) -gt 1 && test $(grep true data/out/experiment_duration_2.csv | wc -l) -eq 1 # test the output file for errors (true means failure to invoke)
89+
run: test -f "data/out/experiment_duration_2.csv" && test $(cat data/out/experiment_duration_2.csv | wc -l) -gt 1 && test $(grep true data/out/experiment_duration_2.csv | wc -l) -le 1 # test the output file for errors (true means failure to invoke)
9090

9191
- name: Print logs
9292
if: ${{ always() }}

.github/workflows/e2e_loader.yaml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: go run cmd/loader.go --config pkg/config/test_config.json
4040

4141
- name: Check the output
42-
run: test -f "data/out/experiment_duration_5.csv" && test $(cat data/out/experiment_duration_5.csv | wc -l) -gt 1 && test $(grep true data/out/experiment_duration_5.csv | wc -l) -eq 0 # test the output file for errors (true means failure to invoke)
42+
run: test -f "data/out/experiment_duration_2.csv" && test $(cat data/out/experiment_duration_2.csv | wc -l) -gt 1 && test $(grep true data/out/experiment_duration_2.csv | wc -l) -eq 0 # test the output file for errors (true means failure to invoke)
4343

4444
- name: Print logs
4545
if: ${{ always() }}
@@ -54,4 +54,31 @@ jobs:
5454
- name: Down
5555
if: ${{ always() }}
5656
run: |
57-
kn service delete --all
57+
kn service delete --all
58+
59+
- name: Untar vSwarm YAMLs
60+
if: ${{ always() }}
61+
run: |
62+
tar -xzvf workloads/container/yamls.tar.gz -C workloads/container/
63+
- name: Run vSwarm loader
64+
run: go run cmd/loader.go --config pkg/config/test_vswarm_config.json
65+
66+
- name: Check vSwarm output
67+
run: test -f "data/out/experiment_duration_2.csv" && test $(cat data/out/experiment_duration_2.csv | wc -l) -gt 1 && test $(grep true data/out/experiment_duration_2.csv | wc -l) -le 1 # test the output file for errors (true means failure to invoke)
68+
69+
- name: Print logs
70+
if: ${{ always() }}
71+
run: |
72+
set -x
73+
container_list=$(kubectl get pods -n default -o jsonpath="{.items[*].spec.containers[*].name}")
74+
for container_name in $container_list
75+
do
76+
kubectl logs -n default -c $container_name -l serving.knative.dev/service=${{ matrix.service }}
77+
done
78+
- name: Down
79+
if: ${{ always() }}
80+
run: |
81+
kn service delete --all
82+
83+
84+

pkg/common/trace_types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ type Function struct {
9999

100100
ColdStartBusyLoopMs int
101101

102-
CPURequestsMilli int
103-
MemoryRequestsMiB int
104-
CPULimitsMilli int
105-
YAMLPath string
106-
PreDeploymentCommands []interface{}
107-
Specification *FunctionSpecification
102+
CPURequestsMilli int
103+
MemoryRequestsMiB int
104+
CPULimitsMilli int
105+
YAMLPath string
106+
PreDeploymentCommands []string
107+
Specification *FunctionSpecification
108108
}
109109

110110
type Node struct {

0 commit comments

Comments
 (0)