This is a rough proof of concept.
There will be broken things.
Comments are welcome.
Installation
I hereby claim:
To claim this, I am signing this object:
This was a test for a bit of fun one evening. | |
Data captured using https://www.sparkfun.com/products/12650 connected to one of the photon's ADC pins. | |
Data is forwarded (in bursts) via TCP to a python script, and forwarded to InfluxDB. | |
Biosppy is run every second on data received to extract heartrate, which is also sent to InfluxDB. |
module TimedSprocketsLoad | |
def load(uri) | |
result = nil | |
time = Benchmark.realtime do | |
result = super | |
end | |
if time > 0.5 | |
Rails.logger.info "[Sprockets Time] #{time}s \t Loaded #{uri}" |
#!/bin/sh | |
# Requires GNU time (gtime) | |
gtime -v ruby faraday-memory-leak.rb 2> /tmp/benchmark | |
cat /tmp/benchmark | grep "Maximum resident set size" |