Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hyperledger/indy-node into indy-1…
Browse files Browse the repository at this point in the history
…957-trustee-auth-rules
  • Loading branch information
andkononykhin committed Jan 30, 2019
2 parents cecc538 + dec16bf commit cb725e4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
5 changes: 5 additions & 0 deletions indy_node/test/tools/test_nsreplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def tconf(tconf):
return tconf


@pytest.yield_fixture(scope="session", autouse=True)
def warncheck(warnfilters):
pass


def test_end_to_end_replay(looper,
tdir,
tdirWithPoolTxns,
Expand Down
36 changes: 23 additions & 13 deletions scripts/validator-info
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,18 @@ class TransactionsStats(BaseUnknown):
else:
return ""

def items(self):
return dict(self.val).items()

def __iter__(self):
return iter(self.val)

def __getitem__(self, key):
return self.val[key]

def __setitem__(self, key, value):
self.val[key] = value


class AverageStats(BaseStats):
shema = [
Expand Down Expand Up @@ -550,21 +559,22 @@ def nagios(vstats):
if "running" == running:
state = '0'

lines = [
"{} {}_Total_Config_Transactions config_transactions={} {} Total Config Transactions".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['transaction-count']['config'],vstats['Node_info']['Name'])
] + [
"{} {}_Total_Ledger_Transactions ledger_transactions={} {} Total Ledger Transactions".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['transaction-count']['ledger'],vstats['Node_info']['Name'])
] + [
"{} {}_Total_Pool_Transactions pool_transactions={} {} Total Pool Transactions".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['transaction-count']['pool'],vstats['Node_info']['Name'])
] + [
"{} {}_Read_Transactions_per_second read_transactions_per_second={} {} Read Transactions/Second".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['average-per-second']['read-transactions'],vstats['Node_info']['Name'])
lines = ["{} {}_Total_{}_Transactions config_transactions={} {} Total {} Transactions".format(
state,
vstats['Node_info']['Name'],
ledger_name.title(),
count,
vstats['Node_info']['Name'],
ledger_name.title())
for ledger_name, count in vstats['Node_info']['Metrics']['transaction-count'].items()]

lines += ["{} {}_Read_Transactions_per_second read_transactions_per_second={} {} Read Transactions/Second".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['average-per-second']['read-transactions'],
vstats['Node_info']['Name'])
] + [
"{} {}_Write_Transactions_per_second write_transactions_per_second={} {} Write Transactions/Second".format(
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['average-per-second']['write-transactions'],vstats['Node_info']['Name'])
state,vstats['Node_info']['Name'],vstats['Node_info']['Metrics']['average-per-second']['write-transactions'],
vstats['Node_info']['Name'])
] + [
"{} {}_Number_of_Validators number_of_validators={} {} Number of Validators".format(
state,vstats['Node_info']['Name'],vstats['Pool_info']['Total_nodes_count'],vstats['Node_info']['Name'])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
data_files=[(
(BASE_DIR, ['data/nssm_original.exe'])
)],
install_requires=['indy-plenum-dev==1.6.656',
install_requires=['indy-plenum-dev==1.6.665',
'python-dateutil',
'timeout-decorator==0.4.0',
'distro==1.3.0'],
Expand Down

0 comments on commit cb725e4

Please sign in to comment.