#define SELECT_CHUNKS_APP "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
- "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+ "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
"from statistics " \
- "group by iftype, ifname, time_stamp, hw_net_protocol_type, is_roaming " \
- "order by time_stamp, iftype, ifname, hw_net_protocol_type, is_roaming"
+ "group by iftype, ifname, timestamp, hw_net_protocol_type, is_roaming " \
+ "order by timestamp, iftype, ifname, hw_net_protocol_type, is_roaming"
#define SELECT_CHUNKS_APP_IFACE "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
- "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+ "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
"from statistics where time_stamp between ? and ? and binpath = ? " \
"and iftype = ? " \
- "group by time_stamp, hw_net_protocol_type, is_roaming, " \
+ "group by timestamp, hw_net_protocol_type, is_roaming, " \
"iftype, ifname, subscriber_id " \
- "order by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+ "order by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
"is_roaming"
#define SELECT_TOTAL "select iftype, hw_net_protocol_type, " \
#define SELECT_CHUNKS_TOTAL "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
- "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+ "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
"from statistics where time_stamp between ? and ? " \
"and binpath NOT LIKE 'TOTAL_%' " \
- "group by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+ "group by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
"is_roaming " \
- "order by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+ "order by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
"is_roaming"
#define SELECT_CHUNKS_TOTAL_IFACE "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
- "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+ "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
"from statistics where time_stamp between ? and ? " \
"and iftype = ? " \
"and binpath NOT LIKE 'TOTAL_%' " \
- "group by time_stamp, hw_net_protocol_type, is_roaming, iftype, ifname, subscriber_id " \
- "order by time_stamp, hw_net_protocol_type, is_roaming, iftype, " \
+ "group by timestamp, hw_net_protocol_type, is_roaming, iftype, ifname, subscriber_id " \
+ "order by timestamp, hw_net_protocol_type, is_roaming, iftype, " \
"ifname, subscriber_id"
/* INSERT statement */
"NOTIMPL"
};
-void __stc_statistics_print_app_info(const table_statistics_info *info)
-{
- if (!info)
- return;
-
- STC_LOGD("========== App data (Statistics) ==========");
- STC_LOGD("app_id : [%s]", info->app_id ? info->app_id : "NULL");
- STC_LOGD("ifname : [%s]", info->ifname ? info->ifname : "NULL");
- STC_LOGD("Sent : [%lld] bytes", info->cnt.out_bytes);
- STC_LOGD("Received : [%lld] bytes", info->cnt.in_bytes);
- STC_LOGD("===========================================");
-}
-
void __stc_extract_select_rule(const char *key, GVariant *value,
void *user_data)
{
g_variant_builder_init(&sub_builder, G_VARIANT_TYPE("a{sv}"));
__stc_statistics_app_info_builder_add(&sub_builder, info);
- __stc_statistics_print_app_info(info);
g_variant_builder_add_value(builder,
g_variant_builder_end(&sub_builder));
g_variant_builder_init(&sub_builder, G_VARIANT_TYPE("a{sv}"));
__stc_statistics_app_info_builder_add(&sub_builder, info);
- __stc_statistics_print_app_info(info);
g_variant_builder_add_value(builder,
g_variant_builder_end(&sub_builder));