Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Add PyAirbyte performance profiling option without caching #323

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Jul 31, 2024

Adds ability to quickly profile performance using the helper script in the examples directory.

This previous version (with cache) tests our max throughput from Source to Cache (approx. 50K records/second or ~10 MB/s):

poetry run python ./examples/run_perf_test_reads.py -e=5

image

And this new version with --no-cache flag can test the max throughput from Source to (No-Op) Destination (approx. 115K records/second, or ~21 MB/s):

poetry run python ./examples/run_perf_test_reads.py -e=5 --destination=e2e --no-cache

image

Caveats/notes:

  • The tracked "records per second" speeds of the above are isolated to the source and destination, respectively, and do not include approximately 1-2 seconds spin-up time.
  • It's odd that the no-cache version is faster than even the isolated load from cache to destination - 62K records per second vs 110K+ records per second. We may want to look more into this.
  • We can use this method in the future to test arbitrary destinations or sources, connecting them in either side of this pipeline to see what their max speeds are.

Summary by CodeRabbit

  • New Features

    • Introduced a --no-cache command-line argument, allowing users to disable caching during throughput tests.
    • Enhanced caching functionality to provide clearer handling of cache types (duckdb, snowflake, bigquery, or no cache).
  • Bug Fixes

    • Minor documentation updates for clarity on throughput metrics based on record sizes.

These changes improve the flexibility and usability of performance testing scripts.

Copy link

coderabbitai bot commented Jul 31, 2024

Walkthrough

Walkthrough

The recent changes enhance the caching functionality in the PyAirbyte throughput tests by introducing a command-line option to disable caching. Modifications to the get_cache function improve type safety, allowing for more explicit cache handling. These adjustments streamline performance testing, providing users with the flexibility to run tests with or without caching, while also including minor documentation updates for clarity on throughput metrics.

Changes

Files Change Summary
examples/run_perf_test_reads.py Added --no-cache argument to disable caching; updated get_cache and main function signatures for improved type safety and clarity. Minor documentation updates for better throughput metrics understanding included.

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 73064ca and 1e3d0f6.

Files selected for processing (1)
  • examples/run_perf_test_reads.py (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • examples/run_perf_test_reads.py

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@aaronsteers aaronsteers changed the title Aj/chore/add-no-cache-perf-profiling Chore: Add PyAirbyte performance profiling option without caching Jul 31, 2024
@aaronsteers
Copy link
Contributor Author

aaronsteers commented Jul 31, 2024

/fix-pr

Auto-Fix Job Info

This job attempts to auto-fix any linting or formating issues. If any fixes are made,
those changes will be automatically committed and pushed back to the PR.
(This job requires that the PR author has "Allow edits from maintainers" enabled.)

PR auto-fix job started... Check job output.

🟦 Job completed successfully (no changes).

@aaronsteers aaronsteers enabled auto-merge (squash) July 31, 2024 23:13
@aaronsteers aaronsteers merged commit 821c699 into main Jul 31, 2024
16 checks passed
@aaronsteers aaronsteers deleted the aj/chore/add-no-cache-perf-profiling branch July 31, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant