MCPcopy Create free account
hub / github.com/apache/cloudberry / parseargs

Function parseargs

src/backend/gporca/scripts/get_debug_event_counters.py:174–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172
173
174def parseargs():
175 parser = argparse.ArgumentParser(description=_help)
176
177 parser.add_argument('--version', action='version', version='1.0')
178 parser.add_argument("--logFile", default="",
179 help="GPDB log file saved from a run with debug event counters enabled (default is to search "
180 "GPDB master log directory)")
181 parser.add_argument("--allRuns", action="store_true",
182 help="Record all runs, instead of just the last one, use this if you had several psql runs")
183 parser.add_argument("--sql", action="store_true",
184 help="Instead of printing the results on stdout, record them in an SQL database")
185 parser.add_argument("--host", default="localhost",
186 help="Host to connect to (default is localhost).")
187 parser.add_argument("--port", type=int, default="0",
188 help="Port on the host to connect to")
189 parser.add_argument("--dbName", default="",
190 help="Database name to connect to")
191 parser.add_argument("--recreateTable", action="store_true",
192 help="Drop and recreate the debug_counters table, erasing any pre-existing data")
193 parser.add_argument("--raw", action="store_true",
194 help="Just print out the log data, to be used later as a log file for this script")
195
196 parser.set_defaults(verbose=False, filters=[], slice=(None, None))
197
198 # Parse the command line arguments
199 args = parser.parse_args()
200 return args, parser
201
202
203def main():

Callers 1

mainFunction · 0.70

Calls 1

parse_argsMethod · 0.80

Tested by

no test coverage detected