lib: rename inactivity msg to msg iterator inactivity msg
[babeltrace.git] / plugins / utils / counter / counter.c
index fa75b6aeb5e3b7d4784dc292a8d3343339c841b5..dab2d6bcfc6878a5580bef190a0d05f490e54018 100644 (file)
@@ -39,6 +39,9 @@
                }                                                       \
        } while (0)
 
+static
+const char * const in_port_name = "in";
+
 static
 uint64_t get_total_count(struct counter *counter)
 {
@@ -47,7 +50,7 @@ uint64_t get_total_count(struct counter *counter)
                counter->count.stream_end +
                counter->count.packet_begin +
                counter->count.packet_end +
-               counter->count.inactivity +
+               counter->count.msg_iter_inactivity +
                counter->count.other;
 }
 
@@ -61,7 +64,8 @@ void print_count(struct counter *counter)
        PRINTF_COUNT("stream end", "stream ends", stream_end);
        PRINTF_COUNT("packet beginning", "packet beginnings", packet_begin);
        PRINTF_COUNT("packet end", "packet ends", packet_end);
-       PRINTF_COUNT("inactivity", "inactivities", inactivity);
+       PRINTF_COUNT("message iterator inactivity",
+                       "message iterator inactivities", msg_iter_inactivity);
 
        if (counter->count.other > 0) {
                PRINTF_COUNT("  other (unknown) message",
@@ -176,10 +180,8 @@ end:
 }
 
 BT_HIDDEN
-bt_self_component_status counter_port_connected(
-               bt_self_component_sink *comp,
-               bt_self_component_port_input *self_port,
-               const bt_port_output *other_port)
+bt_self_component_status counter_graph_is_configured(
+               bt_self_component_sink *comp)
 {
        bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
        struct counter *counter;
@@ -189,7 +191,8 @@ bt_self_component_status counter_port_connected(
                bt_self_component_sink_as_self_component(comp));
        BT_ASSERT(counter);
        iterator = bt_self_component_port_input_message_iterator_create(
-               self_port);
+               bt_self_component_sink_borrow_input_port_by_name(comp,
+                       in_port_name));
        if (!iterator) {
                status = BT_SELF_COMPONENT_STATUS_NOMEM;
                goto end;
@@ -243,8 +246,8 @@ bt_self_component_status counter_consume(
                        case BT_MESSAGE_TYPE_EVENT:
                                counter->count.event++;
                                break;
-                       case BT_MESSAGE_TYPE_INACTIVITY:
-                               counter->count.inactivity++;
+                       case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
+                               counter->count.msg_iter_inactivity++;
                                break;
                        case BT_MESSAGE_TYPE_STREAM_BEGINNING:
                                counter->count.stream_begin++;
This page took 0.030315 seconds and 4 git commands to generate.