Struct cov::graph::Graph [−][src]
pub struct Graph { /* fields omitted */ }
The combined control-flow graph.
Methods
impl Graph
[src]
impl Graph
pub fn new() -> Graph
[src]
pub fn new() -> Graph
Creates a new graph.
pub fn merge(&mut self, gcov: Gcov) -> Result<()>
[src]
pub fn merge(&mut self, gcov: Gcov) -> Result<()>
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.
pub fn analyze(&mut self)
[src]
pub fn analyze(&mut self)
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.
pub fn report(&self) -> Report
[src]
pub fn report(&self) -> Report
Obtains a coverage report from the graph.
impl Graph
[src]
impl Graph
pub fn write_dot<W: Write>(
&self,
function_name: Symbol,
writer: W
) -> Result<()>
[src]
pub fn write_dot<W: Write>(
&self,
function_name: Symbol,
writer: W
) -> Result<()>
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 Default for Graph
impl Debug for Graph
[src]
impl Debug for Graph
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Graph
[src]
impl Clone for Graph