MCPcopy Create free account
hub / github.com/F-Stack/f-stack / main

Function main

dpdk/usertools/dpdk-pmdinfo.py:45–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44# ----------------------------------------------------------------------------
45def main() -> int: # pylint: disable=missing-docstring
46 try:
47 args = parse_args()
48 logging.basicConfig(
49 stream=sys.stderr,
50 format="%(levelname)s: %(message)s",
51 level={
52 0: logging.ERROR,
53 1: logging.WARNING,
54 }.get(args.verbose, logging.DEBUG),
55 )
56 info = parse_pmdinfo(args.elf_files, args.search_plugins)
57 print(json.dumps(info, indent=2))
58 except BrokenPipeError:
59 pass
60 except KeyboardInterrupt:
61 return 1
62 except Exception as e: # pylint: disable=broad-except
63 logging.error("%s", e)
64 return 1
65 return 0
66
67
68# ----------------------------------------------------------------------------

Callers 1

dpdk-pmdinfo.pyFile · 0.70

Calls 3

parse_pmdinfoFunction · 0.85
parse_argsFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected