예제 #1
0
파일: test.cpp 프로젝트: JulianKunkel/siox
		ComponentReport prepareReport(){
			ComponentReport rep;
			rep.addEntry("Stat1", {ReportEntry::Type::SIOX_INTERNAL_DEBUG, 4});
			rep.addEntry("Stat2", {ReportEntry::Type::APPLICATION_PERFORMANCE, 8});

			return rep;
		}
ComponentReport ActivityMultiplexerAsync::prepareReport(){
	ComponentReport rep;

	rep.addEntry("ASYNC_DROPPED_ACTIVITIES", {ReportEntry::Type::SIOX_INTERNAL_CRITICAL, (uint64_t)lost_events});
	rep.addEntry("PROCESSED_ACTIVITIES", {ReportEntry::Type::SIOX_INTERNAL_INFO, (uint64_t)processed_activities});
	rep.addEntry("PROCESSED_ACTIVITIES_ASYNC", {ReportEntry::Type::SIOX_INTERNAL_INFO, processed_events_in_async});

	return rep;
}
ComponentReport ReasonerStandardImplementation::prepareReport() {

	ComponentReport result;

	{	// Disallow other access to aggregated data fields
		unique_lock<mutex> dataLock( dataMutex );

		result.addEntry( "ANOMAL_RUNTIME_MS", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_INFO, VariableDatatype( anomaliesTriggered * update_intervall_ms )));
		result.addEntry( "OBSERVED_RUNTIME_MS", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_INFO, VariableDatatype( cyclesTriggered * update_intervall_ms )));

		result.addEntry( "STATES_SENT_UPSTREAM", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_INFO,  nPushesSent));
		result.addEntry( "STATES_RECEIVED", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_INFO,  nPushesReceived));

		if ( nPushesReceived > 0 ){
			const char * text [] = {
				"UTILIZATION_CPU",
				"UTILIZATION_MEMORY",
				"UTILIZATION_IO",
				"UTILIZATION_NETWORK_SEND",
				"UTILIZATION_NETWORK_RECEIVE",
				"CONSUMED_CPU_SECONDS",
				"CONSUMED_ENERGY_JOULE",
				"CONSUMED_MEMORY_BYTES",
				"CONSUMED_NETWORK_BYTES",
				"CONSUMED_IO_BYTES",
			};

			for (int i=0; i < NODE_STATISTIC_COUNT; i++){
				result.addEntry( text[i], ReportEntry( ReportEntry::Type::APPLICATION_PERFORMANCE,  node_statistics[i] ));
			}
		}

		// for debugging
		ostringstream reportText;
		reportText << this;
		result.addEntry( "TEXT_STATE", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_DEBUG, VariableDatatype( reportText.str() )));
	}

	return result;
}
예제 #4
0
ComponentReport PersistentStorePlugin::prepareReport() {
	ComponentReport result;
	result.addEntry("callsSucessfull", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_PERFORMANCE, VariableDatatype( sucessfullCalls ) ));
	result.addEntry("callsNotFound", ReportEntry( ReportEntry::Type::SIOX_INTERNAL_PERFORMANCE, VariableDatatype( errorCalls ) ));
	return result;
}