<commit_before>import StringIO
import unittest

from pikos.monitor import Monitor as monitor
from pikos.monitors.function_monitor import FunctionMonitor
from pikos.recorders.list_recorder import ListRecorder
from pikos.recorders.text_stream_recorder import TextStreamRecorder
from pikos.tests.test_assistant import TestAssistant

class TestFunctionLogger(unittest.TestCase, TestAssistant):

    def test_function(self):
        recorder = ListRecorder()
        logger = FunctionMonitor(recorder)

        @monitor(logger)
        def gcd(x,y):
            while x > 0:
                x, y = y % x, x
            return y

        def boo():<commit_msg>correct the name of the class<commit_after>import StringIO
import unittest

from pikos.monitor import Monitor as monitor
from pikos.monitors.function_monitor import FunctionMonitor
from pikos.recorders.list_recorder import ListRecorder
from pikos.recorders.text_stream_recorder import TextStreamRecorder
from pikos.tests.test_assistant import TestAssistant

class TestFunctionMonitor(unittest.TestCase, TestAssistant):

    def test_function(self):
        recorder = ListRecorder()
        logger = FunctionMonitor(recorder)

        @monitor(logger)
        def gcd(x,y):
            while x > 0:
                x, y = y % x, x
            return y

        def boo():
{'fraction_non_alphanumeric': 0.06339622641509433, 'fraction_numerical': 0.0015094339622641509, 'mean_word_length': 3.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '7469845', 'n_tokens_mistral': 384, 'n_tokens_neox': 371, 'n_words': 104}