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
class ProfilerLog(object): | |
def __init__(self, profiler_name="", start_ts=None): | |
self._profiler_name = profiler_name | |
self._start_ts = start_ts if start_ts else time.time() | |
self._steps_data = OrderedDict() | |
self._aux_data = {} | |
def step(self, step_name, begin_ts=None, end_ts=None): | |
if step_name not in self._steps_data: | |
begin_ts = begin_ts if begin_ts else time.time() |
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
#!/usr/bin/env python3 | |
import os | |
import time | |
import datetime | |
import argparse | |
from sys import exit | |
from pathlib import Path | |
from typing import Iterator, Tuple | |
from shutil import disk_usage, rmtree |
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 timeit | |
import random | |
import string | |
# Function to generate random text of length 32 | |
def generate_random_text(): | |
return ''.join(random.choices(string.ascii_letters + string.digits, k=32)) | |
# Generate a list of a couple of hundred random text values | |
random_text_list = [generate_random_text() for _ in range(400000)] |
OlderNewer