-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.json
183 lines (183 loc) · 5.81 KB
/
tasks.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
// See PostgreSQL meson doc link https://wiki.postgresql.org/wiki/Meson
"version": "2.0.0",
"tasks": [
{
"label": "meson setup",
"type": "shell",
"command": "meson",
"args": [
"setup",
"$HOME/build", // out of source tree
"--prefix=$HOME/pgsql",
"--buildtype=debug", // default is debugoptimized
"-Dc_args=-fno-inline-functions -fno-omit-frame-pointer -DCOPY_PARSE_PLAN_TREES -DWRITE_READ_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS",
"-Dcassert=true",
"-Dtap_tests=enabled",
"--werror"
],
"problemMatcher": [],
"detail": "meson setup debug configuration"
},
{
"label": "meson setup release",
"type": "shell",
"command": "meson",
"args": [
"setup",
"$HOME/build",
"--prefix=$HOME/pgsql",
"--buildtype=release"
],
"problemMatcher": [],
"detail": "meson setup release configuration"
},
{
"label": "ninja build",
"type": "shell",
"command": "ninja",
"args": [
"-C",
"$HOME/build",
"-j",
"4"
],
"problemMatcher": [],
"detail": "build postgres"
},
{
"label": "build document",
"type": "shell",
"command": "ninja",
"args": [
"-C",
"$HOME/build",
"html"
],
"problemMatcher": [],
"detail": "build html document"
},
{
"label": "regression tests",
"type": "shell",
"command": "meson test -C $HOME/build -q --print-errorlogs --suite setup --suite regress",
"problemMatcher": [],
"detail": "run main regression tests"
},
{
"label": "check-world",
"type": "shell",
"command": "meson test -C $HOME/build -q --print-errorlogs",
"problemMatcher": [],
"detail": "run all tests"
},
{
"label": "ninja install",
"type": "shell",
"command": "ninja install -C $HOME/build",
"problemMatcher": [],
"detail": "install pgsql"
},
{
"label": "init cluster",
"type": "shell",
"command": "$HOME/pgsql/bin/initdb",
"args": [
"-D",
"$PGDATA"
],
"problemMatcher": [],
"detail": "init cluster using initdb"
},
{
"label": "start cluster",
"type": "shell",
"command": "$HOME/pgsql/bin/pg_ctl",
"args": [
"-D",
"$PGDATA",
"-l",
"$PGDATA/logfile",
"start"
],
"problemMatcher": [],
"detail": "start db cluster"
},
{
"label": "restart cluster",
"type": "shell",
"command": "$HOME/pgsql/bin/pg_ctl",
"args": [
"-D",
"$PGDATA",
"-l",
"$PGDATA/logfile",
"restart"
],
"problemMatcher": [],
"detail": "restart db cluster"
},
{
"label": "stop cluster",
"type": "shell",
"command": "$HOME/pgsql/bin/pg_ctl",
"args": [
"-D",
"$PGDATA",
"stop"
],
"problemMatcher": [],
"detail": "stop db cluster"
},
{
"label": "format patch",
"type": "shell",
"command": "git format-patch -o /opt/freedom/patches -${input:formatPatchNumber} -v ${input:formatPatchVersion}",
"problemMatcher": [],
"detail": "generate patches from the topmost <n> commits"
},
{
"label": "perf record",
"type": "shell",
"command": "perf record -o /tmp/perf.data -p `ps aux | grep \"postgres postgres\" | grep -v grep | awk '{print $2}'` --call-graph dwarf sleep 10",
"problemMatcher": [],
"detail": "perf record"
},
{
"label": "perf report",
"type": "shell",
"command": "perf report -i /tmp/perf.data --stdio --call-graph",
"problemMatcher": [],
"detail": "perf report"
},
{
"label": "generate flamegraph",
"type": "shell",
"command": "timestamp=\"$(date +%Y%m%d%H%M%S)\" && perf script -i /tmp/perf.data | /opt/freedom/tools/FlameGraph/stackcollapse-perf.pl | /opt/freedom/tools/FlameGraph/flamegraph.pl > /opt/freedom/perf_$timestamp.svg",
"problemMatcher": [],
"detail": "generate flamegraph"
}
],
"inputs": [
{
"id": "formatPatchNumber",
"description": "patches from the topmost <n> commits",
"type": "promptString",
"default": "1"
},
{
"id": "formatPatchVersion",
"description": "<n>-th iteration of the topic",
"type": "promptString",
"default": "1"
},
{
"id": "patchFile",
"description": "Which patch file to apply?",
"type": "promptString",
"default": "*"
}
]
}