zabbix-agent2/src/libs/zbxdiag/diag_server.c
/******************************************************************************
 *                                                                            *
 * Function: diag_valuecache_add_items                                        *
 *                                                                            *
 * Purpose: add valuecache items diagnostic statistics to json                *
 *                                                                            *
 ******************************************************************************/
diag_valuecache_add_items

Purpose: add valuecache items diagnostic statistics to json
diag_valuecache_add_items Purpose : add valuecache items diagnostic statistics to json
static void	diag_valuecache_add_items(struct zbx_json *json, const char *field, zbx_vc_item_stats_t **items,
		int items_num)
{
	int	i;
	zbx_json_addarray(json, field);
	for (i = 0; i < items_num; i++)
	{
		zbx_json_addobject(json, NULL);
		zbx_json_addint64(json, "itemid", items[i]->itemid);
		zbx_json_addint64(json, "values", items[i]->values_num);
		zbx_json_addint64(json, "request.values", items[i]->hourly_num);
		zbx_json_close(json);
	}
	zbx_json_close(json);
}
static void diag_valuecache_add_items ( struct zbx_json * json , const char * field , zbx_vc_item_stats_t * * items , int items_num ) { int i ; zbx_json_addarray ( json , field ) ; for ( i = 0 ; i < items_num ; i ++ ) { zbx_json_addobject ( json , NULL ) ; zbx_json_addint64 ( json , " " , items [ i ] -> itemid ) ; zbx_json_addint64 ( json , " " , items [ i ] -> values_num ) ; zbx_json_addint64 ( json , " " , items [ i ] -> hourly_num ) ; zbx_json_close ( json ) ; } zbx_json_close ( json ) ; }
Function: diag_valuecache_add_items                                        
                                                                            
 Purpose: add valuecache items diagnostic statistics to json
Function : diag_valuecache_add_items Purpose : add valuecache items diagnostic statistics to json