bitfab 0.61.0
“Client library for sending function execution spans to the Bitfab API. Provides automatic tracing with nested span support.”
Contains an unbounded block loopUses Base64 module
SHA-25646176eb97ca8182780edd01a99f315dec6d994d2dbd3c3c2f1f5d0206f696f71
MaleculeO(La)H₇(Cm₁₁Db₈F₈MgOs₄Po₅U)Md
Evidence
3:7… e "open3"
4
5module Bitfab
6 class ReplayMemoryThrottle
7 MIB = 1024 * 1024
8 MAX_SWAP_USED_RATIO = 0.85
9 CRITICAL_PRESSURE_LEVEL = 4
10 CRITICAL_STALL_PERCENT = 10.0
11 STALL_FILES = ["/sys/fs/cgroup/memory.pressure", "/proc/pressure/memory"].freeze
12 attr_reader :condition
13
14 def self.pressure_critical_from_level(raw)
15 level = Integer(raw.to_s.strip, ex …
26:47… ].include?(ENV.fetch("BITFAB_REPLAY_MEMORY_THROTTLE", "").strip.downcase)
27 @initial_budget = env_bytes("BITFAB_REPLAY_CHILD_MEMORY_MB", 2048 * MIB)
28 @floor = env_bytes("BITFAB_REPLAY_MEMORY_ …
72:50… >= @floor
73 end
74
75 def memory_snapshot
76 if File.file?("/proc/meminfo")
77 fields = File.read("/proc/meminfo").scan(/^(\w+):\s+(\d+)/).to_h.transform_values { |value| value.to_i * 1024 }
78 total = fields["SwapTotal" …
95:6… ef resident_bytes(pid)
96 value = if File.file?("/proc/#{pid}/status")
97 File.read("/proc/#{pid}/status")[/^VmRSS:\s+(\d+)/, 1]
98 else
99 read_command("ps", "-o", "rss=", "-p", pid. …
3:7… e "json"
4
5module Bitfab
6 module BAML
7 ALLOWED_ENV_KEYS = %w[OPENAI_API_KEY].freeze
8 COLLECTOR_FIELDS = %i[logs last usage function_name log_type timing calls selected_call tags
9 selected http_request http_response provider client_name input_tokens output_tokens
10 cached_input_tokens start_time_utc_ms duration_ms url method headers body status].freeze
11
12 module_function
13
14 def lo …
Showing the top 5 files — 5 more files (58 regions) not shown.
No evidence locations were recorded for this file. Raw result