CLI Reference > Configuration Management Commands > si calculateprojectmetrics
  
si calculateprojectmetrics
calculates the metrics for the specified project checkpoint
Synopsis
si calculateprojectmetrics [(-P project|--project=project)] [(-S sandbox|--sandbox=sandbox)] [--[no]failOnAmbiguousProject] [--[no]recomputeall] [--projectRevision=rev] [--hostname=server] [--port=number] [--password=password] [--user=name] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [(-g|--gui)] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]]
Description
si calculateprojectmetrics calculates the metrics for the specified project checkpoint. For example,
si calculateprojectmetrics --project=c:/Aurora_Program/bin/Libra/project.pj --projectRevision=1.34 --recomputeall
If you decide to track metrics for a project that has already been checkpointed, you can calculate metrics for existing checkpoints using this command. All project level statistics are recomputed, but each member's statistics are only computed if none currently exist. You can use the --recomputeall option to recompute all member metrics.
The --projectRevision option is mandatory. Metrics can only be calculated for a build project.
There may be a performance impact the first time you calculate project metrics. The first time you calculate metrics for a project with a large number of members that existed before implementing metrics, the metric calculation may take a significant amount of time. The increase in time is due to the need for the metrics to be initially computed for the pre-existing members. Subsequent metric calculations are aggregated for members of the project.
* 
Metrics are only supported for database type repositories.
Options
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
--[no]recomputeall
specifies whether you want to recompute metrics for all members. This is useful when new metrics have been added.
This recomputes metrics for all members recursively, summing up all their individual metrics, and putting the rolled up values on the specified project.
If a given member has no metrics, then it is assumed to not have had metrics computed for it. This command computes metrics for them by invoking the metrics trigger. If a member has even one metric, it is assumed to have had metrics computed for it, and this command doesn't compute them. So if you changed the trigger to generate new metrics, they will not automatically be recomputed unless you use the --recomputeall option, which forces the command to ignore the existing metrics and rerun metrics on each member.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using si setprefs or si viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands: si viewprojectmetrics, si createmetricinfo, si createmetricinfo, si viewmetricsinfo
Miscellaneous: diagnostics, options, preferences