PRIVATE inline FlowValue DataFlowUnary(Node *node, unaryNode *u, FlowValue v) { if (u->op == SIZEOF) { /* expression in sizeof is never executed */ if (Forw) return Exit(node, Entry(node, v)); else return Entry(node, Exit(node, v)); } else { if (Forw) return Exit(node, DataFlow(u->expr, Entry(node, v))); else return Entry(node, DataFlow(u->expr, Exit(node, v))); } }
float CDataFlowCounter::GetFlowSpeed( uint64 uNow ) { DataFlow( 0, uNow ); size_t stTotalDataSize=0; uint64 uTotalTime=0; //计算索引前面的 for( size_t i=0;i<stArySize ;++i ) { const CDataFlowUnit& Unit= m_aryFlowUnit[i]; stTotalDataSize += Unit.m_stDataSize; uTotalTime += Unit.m_uTime; } return stTotalDataSize/(float)uTotalTime; }
void Outputer::Refresh() { #ifdef WIN32 QString line = GetPercentBar(cur_phase)+space+GetSpecial(cur_phase)+space+Errors(cur_phase)+space+DataFlow(); printf(QString("\r"+line).toStdString().c_str()); OutputToFile(); #endif }