Search NASAโŒ• Search

NASA NTRS ยท 20110015810

The Creation of a CPU Timer for High Fidelity Programs

Abstract

Using C and C++ programming languages, a tool was developed that measures the efficiency of a program by recording the amount of CPU time that various functions consume. By inserting the tool between lines of code in the program, one can receive a detailed report of the absolute and relative time consumption associated with each section. After adapting the generic tool for a high-fidelity launch vehicle simulation program called MAVERIC, the components of a frequently used function called "derivatives ( )" were measured. Out of the 34 sub-functions in "derivatives ( )", it was found that the top 8 sub-functions made up 83.1% of the total time spent. In order to decrease the overall run time of MAVERIC, a launch vehicle simulation program, a change was implemented in the sub-function "Event_Controller ( )". Reformatting "Event_Controller ( )" led to a 36.9% decrease in the total CPU time spent by that sub-function, and a 3.2% decrease in the total CPU time spent by the overarching function "derivatives ( )".

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Dick, Aidan A.. 2011-08-05. The Creation of a CPU Timer for High Fidelity Programs. https://ntrs.nasa.gov/citations/20110015810

Cite the original work for its findings. Save a collection to share your selection of sources.