<commit_before>require_relative '../../spec_helper'
require_relative 'fixtures/clocks'

describe "Process.clock_getres" do
  # clock_getres() seems completely buggy on FreeBSD:
  # https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190428T093003Z.fail.html.gz
  platform_is_not :freebsd, :openbsd do
    # NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions
    ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value|
      it "matches the clock in practice for Process::#{name}" do
        times = 10_000.times.map { Process.clock_gettime(value, :nanosecond) }
        reported = Process.clock_getres(value, :nanosecond)
<commit_msg>spec/ruby/core/process/clock_getres_spec.rb: skip on Android<commit_after>require_relative '../../spec_helper'
require_relative 'fixtures/clocks'

describe "Process.clock_getres" do
  # clock_getres() seems completely buggy on FreeBSD:
  # https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20190428T093003Z.fail.html.gz
  platform_is_not :freebsd, :openbsd, :android do
    # NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions
    ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value|
      it "matches the clock in practice for Process::#{name}" do
        times = 10_000.times.map { Process.clock_gettime(value, :nanosecond) }
        reported = Process.clock_getres(value, :nanosecond)

{'fraction_non_alphanumeric': 0.1090407177363699, 'fraction_numerical': 0.03036576949620428, 'mean_word_length': 4.62015503875969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7465834', 'n_tokens_mistral': 522, 'n_tokens_neox': 474, 'n_words': 98}