Posts Authored By

Mike Lin

Senior Software Engineer

  1. Diagnosing and Fixing Memory Leaks in Python

    Mike Lin
    Mike Lin

    Senior Software Engineer

    When your metrics report that a Python component is experiencing random restarts and instability after a few days of uptime, what do you do? In our case, looking at memory usage showed that a component's memory footprint increased monotonically and continuously, indicating a memory leak. A powerful memory tracking tool in the Python standard library, tracemalloc, made it possible to diagnose and fix the leak quickly. In this post, we'll look at how we used it.

  2. Python Mocking 101: Fake It Before You Make It

    Mike Lin
    Mike Lin

    Senior Software Engineer

    In Python, mocking is accomplished through the unittest.mock module. The module contains a number of useful classes and functions, the most important of which are the patch function (as decorator and context manager) and the MagicMock class. Mocking in Python is largely accomplished through the use of these two powerful components.

Take Control of Your Cloud Today

You and your team can be productive with Fugue on AWS in less than an hour, without the need for professional services.