Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flame-clmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flame
flame-clmc
Commits
c89f8f24
Commit
c89f8f24
authored
6 years ago
by
Nikolay Stanchev
Browse files
Options
Downloads
Patches
Plain Diff
Updates rtt data pipeline script
parent
3cb5e3f1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/test/pipeline.sh
+27
-16
27 additions, 16 deletions
scripts/test/pipeline.sh
with
27 additions
and
16 deletions
scripts/test/pipeline.sh
+
27
−
16
View file @
c89f8f24
...
...
@@ -4,12 +4,12 @@ sfc="fms-sfc"
sfci
=
"fms-sfc-1"
service_function
=
"fms-storage"
endpoint
=
"fms-storage-endpoint"
measurement
=
"
graph_measurement
"
response_time_field
=
"
mean
(processing_time
_rate)/
1000"
request_size_field
=
"
mean
(bytes_received
_rate
)"
response_size_field
=
"
mean
(bytes_sent
_rate
)"
measurement
=
"
tomcat_connector
"
response_time_field
=
"
(max
(processing_time
) - min(processing_time)) / ((count(processing_time) - 1)*
1000
)
"
request_size_field
=
"
(max
(bytes_received
) - min(bytes_received)) / (count(bytes_received) - 1
)"
response_size_field
=
"
(max
(bytes_sent
) - min(bytes_sent)) / (count(bytes_sent) - 1
)"
ue
=
"ue22"
rtt_measurement
=
"graph_
query
"
rtt_measurement
=
"graph_
measurement
"
query_period
=
30
...
...
@@ -32,30 +32,41 @@ do
--argjson
from
${
start
}
\
--argjson
to
${
end
}
\
'{from: $from, to: $to, service_function_chain: $sfc, service_function_chain_instance: $sfci, service_functions: {($sf): {measurement_name: $measurement, response_time_field: $response_time, request_size_field: $request_size, response_size_field: $response_size}}}'
)
echo
${
JSON_STRING
}
echo
"Sending build request to CLMC"
response
=
$(
curl
-s
-X
POST
-d
"
${
JSON_STRING
}
"
http://172.40.231.51/clmc-service/graph/temporal
)
echo
${
response
}
timestamp
=
$(
echo
${
response
}
| jq
-r
'.graph.time_range.to'
)
graph_uuid
=
$(
echo
${
response
}
| jq
-r
'.graph.uuid'
)
echo
${
graph_uuid
}
echo
${
timestamp
}
echo
"Received request uuid
${
graph_uuid
}
"
echo
"Timestamp to use for measurement
${
timestamp
}
"
echo
"Querying for round-trip time..."
response
=
$(
curl
-s
-X
GET
"http://172.40.231.51/clmc-service/graph/temporal/
${
graph_uuid
}
/round-trip-time?startpoint=
${
ue
}
&endpoint=
${
endpoint
}
"
)
echo
${
response
}
tags
=
$(
echo
${
response
}
| jq
-r
'.global_tags | to_entries | map("\(.key)=\(.value|tostring)") | join(",")'
)
echo
${
tags
}
global_tags
=
$(
echo
${
response
}
| jq
-r
'.global_tags | to_entries | map("\(.key)=\(.value|tostring)") | join(",")'
)
echo
"Global tags:
${
global_tags
}
"
local_tags
=
$(
echo
${
response
}
| jq
-r
'.local_tags | to_entries | map("\(.key)=\(.value|tostring)") | join (",")'
)
echo
"Local tags:
${
local_tags
}
"
rtt
=
$(
echo
${
response
}
| jq
-r
'.round_trip_time'
)
echo
${
rtt
}
echo
"Round-trip-time:
${
rtt
}
"
measurement_line
=
"
${
rtt_measurement
}
,
${
tags
}
round_trip_time=
${
rtt
}
${
timestamp
}
"
service_delay
=
$(
echo
${
response
}
| jq
-r
'.response_time'
)
echo
"Service delay:
${
service_delay
}
"
network_delay
=
$(
echo
${
response
}
| jq
-r
'.total_forward_latency'
)
echo
"Network latency
${
network_delay
}
"
measurement_line
=
"
${
rtt_measurement
}
,
${
global_tags
}
,
${
local_tags
}
round_trip_time=
${
rtt
}
,service_delay=
${
service_delay
}
,network_delay=
${
network_delay
}
${
timestamp
}
"
echo
"Measurement line:
${
measurement_line
}
"
response
=
$(
curl
-si
-XPOST
"http://172.40.231.51/influxdb/write?db=
${
sfc
}
"
--data-binary
"
${
measurement_line
}
"
)
echo
${
response
}
echo
"InfluxDB response:
${
response
}
"
echo
"Deleting temporal graph..."
echo
$(
curl
-s
-X
DELETE
"http://172.40.231.51/clmc-service/graph/temporal/
${
graph_uuid
}
"
)
response
=
$(
curl
-s
-X
DELETE
"http://172.40.231.51/clmc-service/graph/temporal/
${
graph_uuid
}
"
)
echo
${
response
}
echo
"Sleeping
${
query_period
}
seconds"
sleep
${
query_period
}
done
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment