CLI Reference > Configuration Management Commands > si addprojectmetric
si addprojectmetric
adds metrics to a project checkpoint
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]]
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.
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
specifies the metric value to add. The value is in the following format: metricname=value[,count]. For example:
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.
See the diagnostics reference page for possible exit status values.
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