- char aux[100], key[100];
- char *last_value = NULL;
- if (!TRACE_is_active())
- return;
- snprintf(aux, 100, "%f", value);
- snprintf(key, 100, "%s#%s", resource, variable);
-
- last_value = xbt_dict_get_or_null(resource_variables, key);
- if (last_value) {
- if (atof(last_value) == value) {
- return;
- }
- }
- pajeSetVariable(date, variable, resource, aux);
- xbt_dict_set(resource_variables, xbt_strdup(key), xbt_strdup(aux),
- xbt_free);
+ char value_str[INSTR_DEFAULT_STR_SIZE];
+ snprintf(value_str, 100, "%f", value);
+ char *variable_type = instr_variable_type(variable, resource);
+ pajeSetVariable(date, variable, variable_type, value_str);