bool Event::operator == ( const Event& other ) const { return ( other.id() == id() && other.installationId() == installationId() && other.taskId() == taskId() && other.comment() == comment() && other.startDateTime() == startDateTime() && other.endDateTime() == endDateTime() && other.userId() == userId() && other.reportId() == reportId() ); }
QDomElement Event::toXml( QDomDocument document ) const { QDomElement element = document.createElement( EventElement ); element.setAttribute( EventIdAttribute, QString().setNum( id() ) ); element.setAttribute( EventInstallationIdAttribute, QString().setNum( installationId() ) ); element.setAttribute( EventTaskIdAttribute, QString().setNum( taskId() ) ); element.setAttribute( EventUserIdAttribute, QString().setNum( userId() ) ); element.setAttribute( EventReportIdAttribute, QString().setNum( reportId() ) ); if ( m_start.isValid() ) { element.setAttribute( EventStartAttribute, m_start.toString( Qt::ISODate ) ); } if ( m_end.isValid() ) { element.setAttribute( EventEndAttribute, m_end.toString( Qt::ISODate ) ); } if ( !comment().isEmpty() ) { QDomText commentText = document.createTextNode( comment() ); element.appendChild( commentText ); } return element; }
void ProcessId::destroy() { // Should not be in the process queue I(queuePosition==processQueue.end()); // Should not be runnable I(state!=RunningState); I(state!=ReadyState); I(pidTable[pid] == this); // Copy stats nSwitchs += stats.nSwitchs; nSpawns += stats.nSpawns; nGradInsts += stats.nGradInsts; nWPathInsts+= stats.nWPathInsts; #ifdef TASKSCALAR niKills += stats.niKills; nrKills += stats.nrKills; nRestarts += stats.nRestarts; niKillGradInsts += stats.niKillGradInsts; niKillWPathInsts += stats.niKillWPathInsts; nrKillGradInsts += stats.nrKillGradInsts; nrKillWPathInsts += stats.nrKillWPathInsts; nRestartGradInsts += stats.nRestartGradInsts; nRestartWPathInsts+= stats.nRestartWPathInsts; #endif #if !((defined TLS)||(defined TASKSCALAR)) // When TLS is activated there are so many threads that it is useless to spawn // statistics in such a way. Instead they are summarized with StatsReporter. reportId(); #endif if(ppid>=0) if(pidTable[ppid]) pidTable[ppid]->nChilds--; pidTable[pid]=0; pidPool.in(this); }