incStatsByNewEvent method

void incStatsByNewEvent(
  1. Nip01Event event,
  2. int bytes
)

increment stats by new event

Implementation

void incStatsByNewEvent(Nip01Event event, int bytes) {
  int eventsRead = this.eventsRead[event.kind] ?? 0;
  this.eventsRead[event.kind] = eventsRead + 1;
  int bytesRead = this.dataReadBytes[event.kind] ?? 0;
  this.dataReadBytes[event.kind] = bytesRead + bytes;
}