function readMetric(prefix, proto, node) {
  const value = parseFloat($(prefix + '_value', node).text());
  if (!isNaN(value)) {
    proto.setValue(value);
  }
  if (proto.setUnits) {
    // proto.ord.Percentage doesn't have units.
    proto.setUnits(getSelector($(prefix + '_units', node)));
  }
  const precision = parseFloat($(prefix + '_precision', node).text());
  if (!isNaN(precision)) {
    proto.setPrecision(precision);
  }
  return proto;
}
/**
 * Unpacks a (value, units, precision) tuple into the given type.
 * @param {string} prefix The prefix for element attributes.
 * @param {!jspb.Message} proto A protocol buffer with `value`, `precision`,
 *     and `units` fields.
 * @param {!Node} node The node containing the tuple.
 * @return {!jspb.Message} The updated protocol buffer. Note that the message
 *     is modified in-place.
 */
Unpacks a (value, units, precision) tuple into the given type.
@param {string} prefix The prefix for element attributes.
Unpacks a ( value units precision ) tuple into the given type . @param { string } prefix The prefix for element attributes .
function readMetric(prefix, proto, node) {
  const value = parseFloat($(prefix + '_value', node).text());
  if (!isNaN(value)) {
    proto.setValue(value);
  }
  if (proto.setUnits) {
    proto.setUnits(getSelector($(prefix + '_units', node)));
  }
  const precision = parseFloat($(prefix + '_precision', node).text());
  if (!isNaN(precision)) {
    proto.setPrecision(precision);
  }
  return proto;
}
function readMetric ( prefix , proto , node ) { const value = parseFloat ( $ ( prefix + '_value' , node ) . text ( ) ) ; if ( ! isNaN ( value ) ) { proto . setValue ( value ) ; } if ( proto . setUnits ) { proto . setUnits ( getSelector ( $ ( prefix + '_units' , node ) ) ) ; } const precision = parseFloat ( $ ( prefix + '_precision' , node ) . text ( ) ) ; if ( ! isNaN ( precision ) ) { proto . setPrecision ( precision ) ; } return proto ; }
Unpacks a (value, units, precision) tuple into the given type.
Unpacks a ( value units precision ) tuple into the given type .
// proto.ord.Percentage doesn't have units.