## metric.GetBonusTotal

Function
number metric.GetBonusTotal()
Description
Total bonus score of the metrics
V1 Function Name
New to V2

metric.GetBonusTotal returns the total bonus awarded by all binder metrics.

## Example

This example demonstrates first using metric.GetNames to get the names of the binder metrics, then using metric.GetBonus to get the bonus awarded by each metric. Finally metric.GetBonusTotal is used to get the total bonus, which is compared to the sum of the individual bonuses.

```metrx = metric.GetNames ()
print ( #metrx .. " binder metrics found" )

tbon = 0
for ii = 1, #metrx do
mbon = metric.GetBonus ( metrx [ ii ] )
print ( "metric " .. ii .. " = " .. metrx [ ii ] .. ", bonus = " .. mbon )
tbon = tbon + mbon
end

print ( "sum of bonuses = " .. tbon )
bont = metric.GetBonusTotal ()
print ( "bonus total from metric.GetBonusTotal = " .. bont )
print ( "bonus discrepancy = " .. bont - tbon )

```

The output might look like this:

```3 binder metrics found
metric 1 = SASA Metric, bonus = 1000
metric 2 = DDG Metric, bonus = 1000
metric 3 = SC Metric, bonus = 1000
sum of bonuses = 3000
bonus total from metric.GetBonusTotal = 3000
bonus discrepancy = 0
```