GNUnet  0.11.x
Public Member Functions | Data Fields
gnunet_testing.StatisticsCondition Class Reference
Inheritance diagram for gnunet_testing.StatisticsCondition:
[legend]
Collaboration diagram for gnunet_testing.StatisticsCondition:
[legend]

Public Member Functions

def __init__ (self, peer, subsystem, name, value)
 
def check (self)
 
def evaluate (self, failed_only)
 
- Public Member Functions inherited from gnunet_testing.Condition
def __init__ (self)
 
def __init__ (self, type)
 
def check (self)
 
def evaluate (self, failed_only)
 

Data Fields

 fulfilled
 
 type
 
 peer
 
 subsystem
 
 name
 
 value
 
 result
 
- Data Fields inherited from gnunet_testing.Condition
 fulfilled
 
 type
 

Detailed Description

Definition at line 163 of file gnunet_testing.py.

Constructor & Destructor Documentation

◆ __init__()

def gnunet_testing.StatisticsCondition.__init__ (   self,
  peer,
  subsystem,
  name,
  value 
)

Definition at line 164 of file gnunet_testing.py.

164  def __init__(self, peer, subsystem, name, value):
165  self.fulfilled = False
166  self.type = 'statistics'
167  self.peer = peer
168  self.subsystem = subsystem
169  self.name = name
170  self.value = str(value)
171  self.result = -1
172 
def __init__(self, test, cfg_file)

Member Function Documentation

◆ check()

def gnunet_testing.StatisticsCondition.check (   self)

Definition at line 173 of file gnunet_testing.py.

References gnunet_testing.Check.fulfilled, gnunet_testing.Condition.fulfilled, GnsRecordInfo.name, GNUNET_IDENTITY_EgoLookup.name, userdata.name, GNUNET_IDENTITY_Ego.name, GNUNET_GNS_LookupWithTldRequest.name, GNUNET_REST_Plugin.name, RequestHandle.name, GNUNET_DNSPARSER_Query.name, GNUNET_GETOPT_CommandLineOption.name, ServiceList.name, GNUNET_RECLAIM_Attribute.name, LocalService.name, gnunet_testing.StatisticsCondition.name, GNUNET_RECLAIM_Credential.name, AuthorityChain::.name, AuthorityChain.name, GNUNET_ARM_ServiceInfo.name, LoggingHandle.name, Experiment.name, GNUNET_MESSENGER_MessageName.name, name, GNS_ResolverHandle.name, GNUNET_MESSENGER_MessageFile.name, GNUNET_MESSENGER_MessageBody.name, GNUNET_DNSPARSER_Record.name, GNUNET_PQ_PreparedStatement.name, GNUNET_FS_ProgressInfo.name, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_GS_SearchResultNamespaceEvent.name, GNUNET_ATS_ReservationContext.peer, PeerRecord.peer, GNUNET_CADET_ChannelMonitor.peer, Context.peer, CadetPeerPathEntry.peer, RegexAcceptBlock.peer, Session.peer, Location.peer, RequestAddressMessage.peer, GNUNET_CONVERSATION_PhoneRecord.peer, PeerCmdState.peer, GNUNET_CADET_TEST_AdapterContext.peer, GNUNET_ATS_AddressListHandle.peer, GNUNET_CADET_Channel.peer, BenchmarkPeer.peer, ResponseLocSignatureMessage.peer, MigrationReadyPeer.peer, GNUNET_PEERSTORE_Record.peer, AddressAddMessage.peer, GSF_PeerPerformanceData.peer, ConnectNotifyMessage.peer, GSC_KeyExchangeInfo.peer, DisconnectNotifyMessage.peer, NotifyTrafficMessage.peer, gnunet_testing.StatisticsCondition.peer, AddressUpdateMessage.peer, GNUNET_CADET_LocalChannelCreateMessage.peer, AddressDestroyedMessage.peer, SendMessageRequest.peer, ChannelState.peer, LoggingPeer.peer, GNUNET_ATS_SessionReleaseMessage.peer, ATS_Address.peer, AddressSuggestionMessage.peer, SendMessageReady.peer, GNUNET_DNS_Advertisement.peer, GNUNET_MESSENGER_MessagePeer.peer, GNUNET_MESSENGER_MessageMiss.peer, GNUNET_CADET_LocalInfo.peer, PreferenceGenerator.peer, SendMessage.peer, PeerInformationMessage.peer, GNUNET_CADET_ChannelInfo.peer, GNUNET_CADET_PeerListEntry.peer, MonitorNotifyMessage.peer, PropertyGenerator.peer, GNUNET_TESTBED_EventInformation.peer, GNUNET_TESTBED_EventInformation::.peer, AddressListRequestMessage.peer, GNUNET_CADET_RequestPathInfoMessage.peer, ReservationRequestMessage.peer, ReservationResultMessage.peer, GNUNET_CADET_PeerPathDetail.peer, GNUNET_MESSENGER_MessageBody.peer, ChangePreferenceMessage.peer, FeedbackPreferenceMessage.peer, RecentRequest.peer, GNUNET_CADET_TunnelDetails.peer, GNUNET_HELLO_Address.peer, GNUNET_TUN_GnsVpnRecord.peer, LocUriAssembly.peer, GNUNET_ARM_ResultMessage.result, gnunet_testing.StatisticsCondition.result, GNUNET_ATS_TEST_Topology.result, EqualsContext.result, GNUNET_TESTBED_PeerInformation.result, GNUNET_FS_ProgressInfo.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_FS_SearchResultEvent.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_FS_SearchResumeResultEvent.result, gnunet_testing.StatisticsCondition.subsystem, KeywordCounter.value, GNUNET_SCALARPRODUCT_Element.value, GNUNET_PEERSTORE_Record.value, gnunet_testing.StatisticsCondition.value, GNUNET_Uuid.value, ChallengeNonceP.value, GetContext.value, HttpResponseHeader.value, RemoveContext.value, and GNUNET_FS_ProgressInfo.value.

173  def check(self):
174  if (self.fulfilled == False):
175  self.result = self.peer.get_statistics_value(
176  self.subsystem, self.name
177  )
178  if (self.result == self.value):
179  self.fulfilled = True
180  return True
181  else:
182  return False
183  else:
184  return True
185 
def get_statistics_value(self, subsystem, name)

◆ evaluate()

def gnunet_testing.StatisticsCondition.evaluate (   self,
  failed_only 
)

Definition at line 186 of file gnunet_testing.py.

References gnunet_testing.Check.fulfilled, gnunet_testing.Condition.fulfilled, GnsRecordInfo.name, GNUNET_IDENTITY_EgoLookup.name, userdata.name, GNUNET_IDENTITY_Ego.name, GNUNET_GNS_LookupWithTldRequest.name, GNUNET_REST_Plugin.name, RequestHandle.name, GNUNET_DNSPARSER_Query.name, GNUNET_GETOPT_CommandLineOption.name, ServiceList.name, GNUNET_RECLAIM_Attribute.name, LocalService.name, gnunet_testing.StatisticsCondition.name, GNUNET_RECLAIM_Credential.name, AuthorityChain.name, AuthorityChain::.name, GNUNET_ARM_ServiceInfo.name, LoggingHandle.name, Experiment.name, GNUNET_MESSENGER_MessageName.name, name, GNS_ResolverHandle.name, GNUNET_MESSENGER_MessageFile.name, GNUNET_MESSENGER_MessageBody.name, GNUNET_DNSPARSER_Record.name, GNUNET_PQ_PreparedStatement.name, GNUNET_FS_ProgressInfo.name, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_GS_SearchResultNamespaceEvent.name, GNUNET_ATS_ReservationContext.peer, PeerRecord.peer, GNUNET_CADET_ChannelMonitor.peer, Context.peer, CadetPeerPathEntry.peer, RegexAcceptBlock.peer, Session.peer, Location.peer, RequestAddressMessage.peer, GNUNET_CONVERSATION_PhoneRecord.peer, PeerCmdState.peer, GNUNET_CADET_TEST_AdapterContext.peer, GNUNET_ATS_AddressListHandle.peer, GNUNET_CADET_Channel.peer, BenchmarkPeer.peer, ResponseLocSignatureMessage.peer, MigrationReadyPeer.peer, GNUNET_PEERSTORE_Record.peer, AddressAddMessage.peer, GSF_PeerPerformanceData.peer, ConnectNotifyMessage.peer, GSC_KeyExchangeInfo.peer, DisconnectNotifyMessage.peer, NotifyTrafficMessage.peer, gnunet_testing.StatisticsCondition.peer, AddressUpdateMessage.peer, GNUNET_CADET_LocalChannelCreateMessage.peer, AddressDestroyedMessage.peer, SendMessageRequest.peer, ChannelState.peer, LoggingPeer.peer, GNUNET_ATS_SessionReleaseMessage.peer, ATS_Address.peer, AddressSuggestionMessage.peer, SendMessageReady.peer, GNUNET_DNS_Advertisement.peer, GNUNET_MESSENGER_MessagePeer.peer, GNUNET_MESSENGER_MessageMiss.peer, GNUNET_CADET_LocalInfo.peer, PreferenceGenerator.peer, SendMessage.peer, PeerInformationMessage.peer, GNUNET_CADET_ChannelInfo.peer, GNUNET_CADET_PeerListEntry.peer, MonitorNotifyMessage.peer, PropertyGenerator.peer, GNUNET_TESTBED_EventInformation::.peer, GNUNET_TESTBED_EventInformation.peer, AddressListRequestMessage.peer, GNUNET_CADET_RequestPathInfoMessage.peer, ReservationRequestMessage.peer, ReservationResultMessage.peer, GNUNET_CADET_PeerPathDetail.peer, GNUNET_MESSENGER_MessageBody.peer, ChangePreferenceMessage.peer, FeedbackPreferenceMessage.peer, RecentRequest.peer, GNUNET_CADET_TunnelDetails.peer, GNUNET_HELLO_Address.peer, GNUNET_TUN_GnsVpnRecord.peer, LocUriAssembly.peer, GNUNET_ARM_ResultMessage.result, gnunet_testing.StatisticsCondition.result, GNUNET_ATS_TEST_Topology.result, EqualsContext.result, GNUNET_TESTBED_PeerInformation.result, GNUNET_FS_ProgressInfo.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_FS_SearchResultEvent.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent.result, GNUNET_FS_ProgressInfo::GNUNET_FS_SearchStatusEvent::GNUNET_FS_SearchResumeResultEvent.result, gnunet_testing.StatisticsCondition.subsystem, KeywordCounter.value, GNUNET_SCALARPRODUCT_Element.value, GNUNET_PEERSTORE_Record.value, gnunet_testing.StatisticsCondition.value, GNUNET_Uuid.value, ChallengeNonceP.value, GetContext.value, HttpResponseHeader.value, RemoveContext.value, and GNUNET_FS_ProgressInfo.value.

186  def evaluate(self, failed_only):
187  if (self.fulfilled == False):
188  fail = " FAIL!"
189  op = " != "
190  else:
191  fail = ""
192  op = " == "
193  if (((self.fulfilled == False) and (failed_only == True))
194  or (failed_only == False)):
195  logger.debug(
196  '%s %s condition in subsystem %s: %s: (expected/real value) %s %s %s %s',
197  self.peer.id[:4].decode("utf-8"), self.peer.cfg,
198  self.subsystem.ljust(12), self.name.ljust(30), self.value, op,
199  self.result, fail
200  )
201  return self.fulfilled
202 
203 
204 # Specify two statistic values and check if they are equal
static void evaluate(struct GNUNET_TIME_Relative duration_total)

Field Documentation

◆ fulfilled

gnunet_testing.StatisticsCondition.fulfilled

Definition at line 165 of file gnunet_testing.py.

◆ type

gnunet_testing.StatisticsCondition.type

Definition at line 166 of file gnunet_testing.py.

◆ peer

gnunet_testing.StatisticsCondition.peer

◆ subsystem

gnunet_testing.StatisticsCondition.subsystem

◆ name

gnunet_testing.StatisticsCondition.name

◆ value

gnunet_testing.StatisticsCondition.value

◆ result

gnunet_testing.StatisticsCondition.result

The documentation for this class was generated from the following file: