Struct cov::graph::Graph
[−]
[src]
pub struct Graph { /* fields omitted */ }
The combined control-flow graph.
Methods
impl Graph
[src]
fn new() -> Graph
[src]
Creates a new graph.
fn merge(&mut self, gcov: Gcov) -> Result<()>
[src]
Merges a parsed GCNO/GCDA into the graph.
Errors
- Returns
VersionMismatch
if a file has a different version than the previous ones merged. - Returns
DuplicatedFunction
if the same function is merged twice. - Returns
MissingFunction
if a function referred in a GCDA does not exist in the graph. - Returns
CountsMismatch
if the number of profiled arcs in a GCDA does not match the corresponding GCNO.
fn analyze(&mut self)
[src]
Analyzes the graph.
This should be called after all GCNO/GCDAs are merged and before a report is generated.
This method mainly converts the raw arc counts (branch coverage) to block counts (line coverage). If this is not called, the report will be empty.
fn report(&self) -> Report
[src]
Obtains a coverage report from the graph.
impl Graph
[src]
fn write_dot<W: Write>(&self, function_name: Symbol, writer: W) -> Result<()>
[src]
Writes out the graph as Graphvis *.dot
format.
This is mainly intended for debugging.
Only functions with name matching the input function_name
symbol will be printed. If the function_name
is
UNKNOWN_SYMBOL
, however, all nodes will be printed.
Trait Implementations
impl Default for Graph
[src]
impl Debug for Graph
[src]
impl Clone for Graph
[src]
fn clone(&self) -> Graph
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Index<FunctionIndex> for Graph
[src]
type Output = FunctionInfo
The returned type after indexing.
fn index(&self, index: FunctionIndex) -> &FunctionInfo
[src]
Performs the indexing (container[index]
) operation.