cdsap / bagan Goto Github PK
View Code? Open in Web Editor NEWAutomate experimentation and collect data on Gradle projects
License: MIT License
Automate experimentation and collect data on Gradle projects
License: MIT License
Provide feedback when minikube is not running,
actually when we are executing
output=(`minikube status`)
if [ "${output[1]}" != "Running" ]; then
printf '%s\n' "Not found minikube instance with status Running"
exit 1
fi
only works when minikube instance is running, if not finish the program
Currently is not well-formatted:
Bagan setup finished
Folder tmp/ contains the Charts executed in gcloud setup
You can check the reports in http://
35.222.9.221:3000/IS3q0sSWz (admin/admin);
And is not working for gcloud_docker
type
Test are not executed through test task
{
"annotations": [
{
"list": [
{
"buildln": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211,255,1)",
"name": "Annotations & Alert",
"type": "dashboard"
}
]
}
],
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"links": [],
"panels": [
{
"aliasColors": [],
"bars": false,
"dashLength": 10,
"dashes": false,
"dataSource": "influxdb",
"fill": 2,
"gridPos": {
"h": 7,
"w": 19,
"x": 0,
"y": 0
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lineWidth": 1,
"lines": true,
"linewidth": 1,
"nullPointMode": "connected",
"options": {},
"percentage": false,
"pointradius": 2,
"points": true,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"groupBy": [],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT percentile("duration", 99) FROM "tracking"."rpTalaiot"."build" WHERE $timeFilter GROUP BY time($interval), "experiment"",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [],
"tags": []
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "assembleDebug",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"logBase": 1,
"show": true
},
{
"format": "short",
"logBase": 1,
"show": true
}
],
"yaxis": {
"align": false
}
},
{
"content": "### experiment1 ###\n\norg.gradle.jvmargs=-Xmx3g\n kapt.use.worker.api=true\n kapt.incremental.apt=true\n \n\n\n### experiment2 ###\n\norg.gradle.jvmargs=-Xmx3g\n kapt.use.worker.api=true\n kapt.incremental.apt=false\n \n\n\n### experiment3 ###\n\norg.gradle.jvmargs=-Xmx3g\n kapt.use.worker.api=false\n kapt.incremental.apt=true\n \n\n\n### experiment4 ###\n\norg.gradle.jvmargs=-Xmx3g\n kapt.use.worker.api=false\n kapt.incremental.apt=false\n \n\n\n### experiment5 ###\n\norg.gradle.jvmargs=-Xmx4g\n kapt.use.worker.api=true\n kapt.incremental.apt=true\n \n\n\n### experiment6 ###\n\norg.gradle.jvmargs=-Xmx4g\n kapt.use.worker.api=true\n kapt.incremental.apt=false\n \n\n\n### experiment7 ###\n\norg.gradle.jvmargs=-Xmx4g\n kapt.use.worker.api=false\n kapt.incremental.apt=true\n \n\n\n### experiment8 ###\n\norg.gradle.jvmargs=-Xmx4g\n kapt.use.worker.api=false\n kapt.incremental.apt=false\n \n\n\n### experiment9 ###\n\norg.gradle.jvmargs=-Xmx5g\n kapt.use.worker.api=true\n kapt.incremental.apt=true\n \n\n\n### experiment10 ###\n\norg.gradle.jvmargs=-Xmx5g\n kapt.use.worker.api=true\n kapt.incremental.apt=false\n \n\n\n### experiment11 ###\n\norg.gradle.jvmargs=-Xmx5g\n kapt.use.worker.api=false\n kapt.incremental.apt=true\n \n\n\n### experiment12 ###\n\norg.gradle.jvmargs=-Xmx5g\n kapt.use.worker.api=false\n kapt.incremental.apt=false\n \n\n\n",
"gridPos": {
"h": 7,
"w": 5,
"x": 19,
"y": 0
},
"id": 0,
"mode": "markdown",
"options": {},
"title": "Experiments",
"type": "text"
},
{
"columns": [],
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 10,
"x": 0,
"y": 7
},
"id": 5,
"links": [],
"options": {},
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 2,
"desc": false
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/./",
"thresholds": [],
"type": "number",
"unit": "ms"
}
],
"targets": [
{
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT percentile("duration",18) FROM "tracking"."rpTalaiot"."build" WHERE $timeFilter GROUP by "experiment"",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
}
],
"timeFrom": null,
"timeShift": null,
"title": "Percentile Iterations -2",
"transform": "table",
"type": "table"
},
{
"columns": [],
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 9,
"x": 10,
"y": 7
},
"id": 3,
"links": [],
"options": {},
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 2,
"desc": false
},
"style": [
{
"alias": "Time",
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/./",
"thresholds": [],
"type": "number",
"unit": "ms"
}
],
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false,
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "ms"
}
],
"targets": [
{
"groupBy": [],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT min("duration") FROM "tracking"."rpTalaiot"."build" WHERE $timeFilter GROUP by "experiment"",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [],
"tags": []
}
],
"title": "Min build times assembleDebug",
"transform": "table",
"type": "table"
},
{
"cacheTimeout": false,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"format": "none",
"gauge": {
"maxValue": 200,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 7,
"w": 5,
"x": 19,
"y": 7
},
"id": 1,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkLine": {
"fillColor": "rgba(31,118,189,0.18)",
"full": false,
"lineColor": "rgba(31,120,193)",
"show": false
},
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "experiment",
"targets": [
{
"groupBy": [],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"query": "select "experiment" from (SELECT min("per"), "experiment" FROM (SELECT percentile("duration",19) as "per" FROM "tracking"."rpTalaiot"."build" GROUP BY "experiment") )\n",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [],
"tags": []
}
],
"thresholds": "",
"title": "Experiment Winner",
"type": "singlestat",
"valueFontSize": "50%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "Name"
}
],
"refresh": false,
"schemaVersion": 18,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2019-08-17T04:14:40.117Z",
"to": "2019-08-17T04:26:21.473Z"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Bagan",
"uid": "IS3q0sSWz",
"version": 2
}
For the first version, we should included a provisioned dashboard given the specific commands:
Example Dashboard:
Example json:
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"links": [],
"panels": [
{
"columns": [],
"fontSize": "100%",
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 4,
"options": {},
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 2,
"desc": false
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "ms"
}
],
"targets": [
{
"groupBy": [
{
"params": [
"experiment"
],
"type": "tag"
}
],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"value"
],
"type": "field"
}
]
],
"tags": [
{
"key": "task",
"operator": "=",
"value": ":app:assembleDebug"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"transform": "table",
"type": "table"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorPrefix": false,
"colorValue": false,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#73BF69"
],
"format": "ms",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 8,
"w": 7,
"x": 12,
"y": 0
},
"id": 6,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"options": {},
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "mean",
"targets": [
{
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"query": "select experiment from (select min(\"mean\"), experiment from ( select mean(value) from \"tracking\" WHERE \"task\" = ':app:assembleDebug' GROUP BY experiment))",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "task",
"operator": "=",
"value": ":app:assembleDebug"
}
]
}
],
"thresholds": "",
"timeFrom": null,
"timeShift": null,
"title": "Winner",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "min"
},
{
"content": "\n# Title\nExperiment 0: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n- \n\nExperiment 1: \n\n- org.gradle.memory=4g\n- org.gradle.workers=16\n\n\n\n",
"gridPos": {
"h": 16,
"w": 5,
"x": 19,
"y": 0
},
"id": 8,
"mode": "markdown",
"options": {},
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"type": "text"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Influxdb",
"fill": 2,
"gridPos": {
"h": 8,
"w": 19,
"x": 0,
"y": 8
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"options": {},
"percentage": false,
"pointradius": 3,
"points": true,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"experiment"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "tracking",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [
"99"
],
"type": "percentile"
}
]
],
"tags": [
{
"key": "task",
"operator": "=",
"value": ":app:assembleDebug"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Panel Title",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": false,
"schemaVersion": 18,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2019-07-19T02:17:23.067Z",
"to": "2019-07-19T02:25:53.794Z"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "New dashboard Copy",
"uid": "yPaulVNZz",
"version": 2
}
Fix name experiments in the properties
Currently, the execution of the Pod is happening on the poststart
step of the life cycle of the pod.
apiVersion: v1
kind: Pod
metadata:
name: experiment1
labels:
app: experiment
type: experiment
experimentid: QleQWn6CsB1gxQveUUpa
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
initContainers:
- name: git-clone
image: alpine/git
args:
- clone
- --single-branch
- --
- {{ .Values.repository }}
- /repo
securityContext:
runAsUser: 1
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- name: git-repo
mountPath: /repo
containers:
- name: agent
image: {{ .Values.image }}
args: ['sleep', '100000']
envFrom:
- configMapRef:
name: {{ .Values.configMaps }}
volumeMounts:
- name: git-repo
mountPath: /repo
lifecycle:
postStart:
exec:
command:
- bash
- -c
- |
mv *.kt /repo
cd /repo
source /usr/share/sdkman/bin/sdkman-init.sh
source /root/.bashrc
kscript TalaiotInjector.kt
kscript RewriteProperties.kt
for i in `seq 1 {{ .Values.iterations }}`; do {{ .Values.command }}; done
volumes:
- name: git-repo
emptyDir: {}
Anton has suggested the Pod has to be killed by himself once is finished, I need some support here
Related with #10
Once the pod is killed, the problem is how to remove the release with Helm.
With
helm del --purge $( kubectl get pods -l type=experiment -o custom-columns=:metadata.name)
we can remove the releases but I would need to automate the process once the pod is finished
Remove name experiments
Possibility to specify if we want to send tasks metrics and build metrics
Actually, we don't have a way to parse the output given command through a command executor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.