drc_proto: report rule hit statistics
This commit is contained in:
parent
7fc532df2e
commit
ff1872379d
|
@ -26,6 +26,13 @@ void test::DRC_TEST_PROVIDER::Report( DRC_ITEM* item )
|
||||||
m_drcEngine->Report( item, nullptr );
|
m_drcEngine->Report( item, nullptr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void test::DRC_TEST_PROVIDER::ReportWithMarker( DRC_ITEM* item, VECTOR2I aMarkerPos )
|
||||||
|
{
|
||||||
|
item->SetViolatingTest( this );
|
||||||
|
m_drcEngine->Report( item, nullptr ); // fixme: create marker
|
||||||
|
}
|
||||||
|
|
||||||
void test::DRC_TEST_PROVIDER::ReportWithMarker( DRC_ITEM* item, wxPoint aMarkerPos )
|
void test::DRC_TEST_PROVIDER::ReportWithMarker( DRC_ITEM* item, wxPoint aMarkerPos )
|
||||||
{
|
{
|
||||||
item->SetViolatingTest( this );
|
item->SetViolatingTest( this );
|
||||||
|
@ -55,6 +62,7 @@ void test::DRC_TEST_PROVIDER::ReportAux( const wxString fmt, ... )
|
||||||
|
|
||||||
bool test::DRC_TEST_PROVIDER::isErrorLimitExceeded( int error_code )
|
bool test::DRC_TEST_PROVIDER::isErrorLimitExceeded( int error_code )
|
||||||
{
|
{
|
||||||
|
// fixme: implement error limit (or timeout)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,3 +79,12 @@ void test::DRC_TEST_PROVIDER::accountCheck( test::DRC_RULE* ruleToTest )
|
||||||
else
|
else
|
||||||
it->second++;
|
it->second++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test::DRC_TEST_PROVIDER::reportRuleStatistics()
|
||||||
|
{
|
||||||
|
m_drcEngine->ReportAux("Rule hit statistics: ");
|
||||||
|
for( auto stat : m_stats )
|
||||||
|
{
|
||||||
|
m_drcEngine->ReportAux( wxString::Format( " - rule '%s': %d hits ", stat.first->GetName().c_str(), stat.second ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -99,6 +99,8 @@ public:
|
||||||
virtual void ReportAux( const wxString fmt, ... );
|
virtual void ReportAux( const wxString fmt, ... );
|
||||||
virtual void Report( DRC_ITEM* item );
|
virtual void Report( DRC_ITEM* item );
|
||||||
virtual void ReportWithMarker( DRC_ITEM* item, wxPoint aMarkerPos );
|
virtual void ReportWithMarker( DRC_ITEM* item, wxPoint aMarkerPos );
|
||||||
|
virtual void ReportWithMarker( DRC_ITEM* item, VECTOR2I aMarkerPos );
|
||||||
|
|
||||||
virtual void ReportProgress( double aProgress );
|
virtual void ReportProgress( double aProgress );
|
||||||
virtual void ReportStage ( const wxString& aStageName, int index, int total );
|
virtual void ReportStage ( const wxString& aStageName, int index, int total );
|
||||||
|
|
||||||
|
@ -106,6 +108,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
virtual void reportRuleStatistics();
|
||||||
virtual void accountCheck( test::DRC_RULE* ruleToTest );
|
virtual void accountCheck( test::DRC_RULE* ruleToTest );
|
||||||
virtual bool isErrorLimitExceeded( int error_code );
|
virtual bool isErrorLimitExceeded( int error_code );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue