Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 516b632f authored by Howard Ro's avatar Howard Ro
Browse files

Remove statsd enable check when logging

statsd should now be enabled on all devices and this check is
unnnecessarily adding a check for each time there's a call into the
socket, which is inefficient.

Bug: 157082130
Test: make, statsd_test
Change-Id: I0bb0ae0c93516c3a02cb971742c3eba602668a09
parent 8de46ae3
Loading
Loading
Loading
Loading
+8 −16
Original line number Diff line number Diff line
@@ -50,13 +50,6 @@ int stats_log_is_closed() {
int write_buffer_to_statsd(void* buffer, size_t size, uint32_t atomId) {
    int ret = 1;

#ifdef __ANDROID__
    bool statsdEnabled = property_get_bool("ro.statsd.enable", true);
#else
    bool statsdEnabled = false;
#endif

    if (statsdEnabled) {
    struct iovec vecs[2];
    vecs[0].iov_base = (void*)&kStatsEventTag;
    vecs[0].iov_len = sizeof(kStatsEventTag);
@@ -68,7 +61,6 @@ int write_buffer_to_statsd(void* buffer, size_t size, uint32_t atomId) {
    if (ret < 0) {
        note_log_drop(ret, atomId);
    }
    }

    return ret;
}