whylogs.core.statistics.counterstracker

CountersTracker Objects#

class CountersTracker()

Class to keep track of the counts of various data types

Parameters#

count : int, optional Current number of objects true_count : int, optional Number of boolean values null_count : int, optional Number of nulls encountered

increment_count#

| increment_count()

Add one to the count of total objects

increment_bool#

| increment_bool()

Add one to the boolean count

increment_null#

| increment_null()

Add one to the null count

merge#

| merge(other)

Merge another counter tracker with this one

Returns#

new_tracker : CountersTracker The merged tracker

to_protobuf#

| to_protobuf()

Return the object serialized as a protobuf message

from_protobuf#

| @staticmethod
| from_protobuf(message: Counters)

Load from a protobuf message

Returns#

counters : CountersTracker