|
Grader
|
#include <Stats.h>
Public Member Functions | |
| Stats & | operator+= (const Stats &) |
| Stats | operator+ (const Stats &) |
| bool | passed () |
| bool | failed () |
| void | record (std::shared_ptr< RubricItem >) |
| std::string | results () |
| nlohmann::json | resultsJson () |
Public Attributes | |
| unsigned | num_created {0} |
| unsigned | num_run {0} |
| unsigned | num_passed {0} |
| unsigned | num_failed {0} |
| unsigned | num_optional {0} |
| std::vector< std::shared_ptr< RubricItem > > | items |
Record stats against RubricItems that have run.
| bool Stats::failed | ( | ) |
Whether or not at least one of the non-optional RubricItems failed.
| bool Stats::passed | ( | ) |
Whether or not all of the non-optional RubricItems passed.
| void Stats::record | ( | std::shared_ptr< RubricItem > | ) |
Record pass/fail/optional state and feedback. Also aggregates overall stats. Noop if the RubricItem has not run.
| string Stats::results | ( | ) |
Get a stringified JSON of the overall stats.
| json Stats::resultsJson | ( | ) |
Get a JSON of the overall stats.
| std::vector<std::shared_ptr<RubricItem> > Stats::items |
A collection of all the RubricItems that were evaluated. Public for overloading + and +=.
| unsigned Stats::num_created {0} |
Number of RubricItems created.
| unsigned Stats::num_failed {0} |
Number of RubricItems that failed (and were not optional).
| unsigned Stats::num_optional {0} |
Number of RubricItems that were optional.
| unsigned Stats::num_passed {0} |
Number of RubricItems that passed (and were not optional).
| unsigned Stats::num_run {0} |
Number of RubricItems that were evaluated.