mirror of
https://github.com/friendica/friendica
synced 2025-04-22 03:50:11 +00:00
Count inbound and outbound packets
This commit is contained in:
parent
ca5f93a4d5
commit
e011b5956a
13 changed files with 63 additions and 0 deletions
|
@ -26,6 +26,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\KeyValueStorage\Capability\IManageKeyValuePairs;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Model\Register;
|
||||
|
@ -116,6 +117,20 @@ class Stats extends BaseModule
|
|||
'comments' => intval($this->keyValue->get('nodeinfo_local_comments')),
|
||||
],
|
||||
],
|
||||
'packets' => [
|
||||
'inbound' => [
|
||||
Protocol::ACTIVITYPUB => intval($this->keyValue->get('stats_packets_inbound_' . Protocol::ACTIVITYPUB) ?? 0),
|
||||
Protocol::DFRN => intval($this->keyValue->get('stats_packets_inbound_' . Protocol::DFRN) ?? 0),
|
||||
Protocol::DIASPORA => intval($this->keyValue->get('stats_packets_inbound_' . Protocol::DIASPORA) ?? 0),
|
||||
Protocol::OSTATUS => intval($this->keyValue->get('stats_packets_inbound_' . Protocol::OSTATUS) ?? 0),
|
||||
],
|
||||
'outbound' => [
|
||||
Protocol::ACTIVITYPUB => intval($this->keyValue->get('stats_packets_outbound_' . Protocol::ACTIVITYPUB) ?? 0),
|
||||
Protocol::DFRN => intval($this->keyValue->get('stats_packets_outbound_' . Protocol::DFRN) ?? 0),
|
||||
Protocol::DIASPORA => intval($this->keyValue->get('stats_packets_outbound_' . Protocol::DIASPORA) ?? 0),
|
||||
Protocol::OSTATUS => intval($this->keyValue->get('stats_packets_outbound_' . Protocol::OSTATUS) ?? 0),
|
||||
]
|
||||
],
|
||||
'reports' => [
|
||||
'newest' => [
|
||||
'datetime' => $report_datetime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue