lib/gitlab/usage_data/topology.rb
# Given query result vector, map instance to a hash of target labels key/value.
# @return [Hash] mapping instance to a hash of target labels key/value, or the empty hash if input empty vector
Given query result vector, map instance to a hash of target labels key/value.
Given query result vector map instance to a hash of target labels key / value .
def map_instance_labels(query_result_vector, target_labels)
        query_result_vector.to_h do |result|
          key = normalize_and_track_instance(result['metric']['instance'])
          value = result['metric'].slice(*target_labels).symbolize_keys
          [key, value]
        end
      end
def map_instance_labels ( query_result_vector , target_labels ) query_result_vector . to_h do | result | key = normalize_and_track_instance ( result [ 'metric' ] [ 'instance' ] ) value = result [ 'metric' ] . slice ( * target_labels ) . symbolize_keys [ key , value ] end end
Given query result vector, map instance to a hash of target labels key/value.
Given query result vector map instance to a hash of target labels key / value .
mapping instance to a hash of target labels key/value, or the empty hash if input empty vector
mapping instance to a hash of target labels key / value or the empty hash if input empty vector
Hash
query_result_vector
<not_specific>
target_labels
<not_specific>