Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/connectorx@0.4.x
tile.json

tessl/pypi-connectorx

tessl install tessl/pypi-connectorx@0.4.0

Load data from databases to dataframes, the fastest way.

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.05x

Baseline

Agent success rate without this tile

82%

task.mdevals/scenario-3/

Database Performance Benchmark Tool

Build a database performance benchmark tool that efficiently loads and compares large datasets from a database to measure memory usage and execution time.

Capabilities

Load Large Dataset

  • Load a dataset with at least 100,000 rows from a database connection and return it as a dataframe @test
  • Measure and return the peak memory usage during the data loading operation @test

Performance Comparison

  • Execute the same query twice: once using a standard approach and once using an optimized approach, measuring execution time for both @test
  • The optimized approach should complete faster than the standard approach for large datasets @test

Implementation

@generates

API

def load_dataset(connection_string: str, query: str) -> tuple:
    """
    Load a dataset from a database and track memory usage.

    Args:
        connection_string: Database connection string
        query: SQL query to execute

    Returns:
        A tuple of (dataframe, peak_memory_mb) where:
        - dataframe: The loaded data as a pandas DataFrame
        - peak_memory_mb: Peak memory usage in megabytes during loading
    """
    pass

def compare_performance(connection_string: str, query: str) -> dict:
    """
    Compare execution time between standard and optimized data loading approaches.

    Args:
        connection_string: Database connection string
        query: SQL query to execute (should return at least 100K rows for meaningful comparison)

    Returns:
        A dictionary containing:
        {
            'standard_time_seconds': float,
            'optimized_time_seconds': float,
            'speedup_factor': float  # standard_time / optimized_time
        }
    """
    pass

Dependencies { .dependencies }

connectorx { .dependency }

Provides high-performance database-to-dataframe loading with memory optimization.

pandas { .dependency }

Provides standard dataframe operations and pandas.read_sql for comparison baseline.

psutil { .dependency }

Provides memory usage tracking capabilities.