-
-
Save cdisomma1/76b565d645a5b401c4b344076f19b9db to your computer and use it in GitHub Desktop.
Linux Memory Leaks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import netuitive | |
import time | |
import os | |
from pympler import tracker | |
tr = tracker.SummaryTracker() | |
ApiClient = netuitive.Client(url=os.environ.get('API_URL'), api_key=os.environ.get('CUSTOM_API_KEY')) | |
MyElement = netuitive.Element() | |
counter = 0 | |
while True: | |
timestamp = int(time.mktime(time.localtime())) | |
MyElement.add_sample('app.error-' + str(counter), timestamp, 1, host='appserver01') | |
ApiClient.post(MyElement) | |
MyElement.clear_samples() | |
tr.print_diff() | |
counter += 1 | |
Raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment