In order to compute metrics on all units of a given project, you use the gnat driver with '-P' option.
The gnatmetric command has the form gnat metric -P [project_file_path] [options].