lib/care.rb in format_parser-0.13.6 vs lib/care.rb in format_parser-0.14.0

- old
+ new

@@ -171,13 +171,13 @@ # Reads the requested page from the given IO # # @param io[IO] the IO to read from # @param page_i[Integer] which page (zero-based) to read def read_page(io, page_i) - FormatParser::Measurometer.increment_counter('format_parser.parser.Care.page_reads_from_upsteam', 1) + Measurometer.increment_counter('format_parser.parser.Care.page_reads_from_upsteam', 1) io.seek(page_i * @page_size) - read_result = io.read(@page_size) + read_result = Measurometer.instrument('format_parser.Care.read_page') { io.read(@page_size) } if read_result.nil? # If the read went past the end of the IO the read result will be nil, # so we know our IO is exhausted here if @lowest_known_empty_page.nil? || @lowest_known_empty_page > page_i @lowest_known_empty_page = page_i