CLI Reference > Configuration Management Commands > si addprojectmetric
 
si addprojectmetric
adds metrics to a project checkpoint
Synopsis
si addprojectmetric [--metric=value] [(-P project|--project=project)] [(-S sandbox|--sandbox=sandbox)] [--[no]failOnAmbiguousProject] [--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 addprojectmetric adds the value for one or more metrics to the specific project checkpoint. For example,
si addprojectmetric --project=c:/Aurora_Program/bin/Libra/project.pj --projectRevision=1.2 --metric=functions=50,10
You can use a third party tool to calculate metrics for C or C++ in the context of a sandbox. You add the calculated value of the metric to a project checkpoint using this command.
The --projectRevision option is mandatory. Metrics can only be added to a build 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.
--metric=value
specifies the metric value to add. The value is in the following format: metricname=value[,count]. For example:
--metric=functions=50,10
This example sets the count of the number of functions to 50, as computed over 10 files (this allows the metric to be displayed as an average of 5 functions per file).
The metricname must be a known metric. Metrics are created using the si createmetricinfo command.
This option can be repeated to add multiple metrics at the same time.
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 viewmetricsinfo, si calculateprojectmetrics
Miscellaneous: diagnostics, options, preferences