Exemple #1
0
def main():

    parser = argparse.ArgumentParser(
        description="Profile C++ executable with arguments.",
        parents=[logger.loggingParser])

    parser.add_argument("command", nargs="+", help="Command to be profiled.")
    parser.add_argument("-p",
                        "--profiler",
                        default="igprof",
                        choices=["igprof", "valgrind"],
                        help="Profiling tool. [Default: %(default)s]")
    runningOptionsGroup.add_argument(
        "--profile-options",
        default="pp",
        help=
        "Additional options for profiling. Choose memory (mp) or performance (pp). [Default: %(default)s]"
    )
    parser.add_argument("-o",
                        "--output-dir",
                        default=None,
                        help="Output directory. [Default: tmp. directory]")

    args = parser.parse_args()
    logger.initLogger(args)

    profile_cpp.profile_cpp(command=args.command,
                            profiler=args.profiler,
                            profiler_opt=args.profile_options,
                            output_dir=args.output_dir)
Exemple #2
0
    def measurePerformance(self, profTool, profOpt):
        """run Artus with profiler"""

        profile_cpp.profile_cpp(
            command=self._executable + " " + self._configFilename,
            profiler=profTool,
            profiler_opt=profOpt,
            output_dir=os.path.dirname(self._args.output_file))

        return 0
Exemple #3
0
	def measurePerformance(self, profTool, profOpt):
		"""run Artus with profiler"""

		profile_cpp.profile_cpp(
				command=self._executable+" "+self._configFilename,
				profiler=profTool,
				profiler_opt=profOpt,
				output_dir=os.path.dirname(self._args.output_file)
		)

		return 0
Exemple #4
0
def main():

	parser = argparse.ArgumentParser(description="Profile C++ executable with arguments.",
	                                 parents=[logger.loggingParser])

	parser.add_argument("command", nargs="+",
	                    help="Command to be profiled.")
	parser.add_argument("-p", "--profiler", default="igprof", choices=["igprof", "valgrind"],
	                    help="Profiling tool. [Default: %(default)s]")
	runningOptionsGroup.add_argument("--profile-options", default="pp",
						help="Additional options for profiling. Choose memory (mp) or performance (pp). [Default: %(default)s]")
	parser.add_argument("-o", "--output-dir", default=None,
	                    help="Output directory. [Default: tmp. directory]")

	args = parser.parse_args()
	logger.initLogger(args)

	profile_cpp.profile_cpp(command=args.command, profiler=args.profiler, profiler_opt=args.profile_options, output_dir=args.output_dir)