mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-16 04:58:01 +00:00
- Add 9 performance indexes to improve query performance by ~5% - ConfirmedEmail indexes: digest, digest_sha256, access_count, bluesky_handle, user_access, photo_access - Photo indexes: format, access_count, user_format - Use CONCURRENTLY for PostgreSQL production safety - Handle MySQL compatibility (skip partial indexes) - All index names under 30 characters for Django compatibility - Migration includes proper error handling and logging Indexes address production performance issues: - 49.4M digest lookups (8.57ms avg → significantly faster) - 49.3M SHA256 digest lookups (8.45ms avg → significantly faster) - ORDER BY access_count queries - Bluesky handle IS NOT NULL queries (partial index on PostgreSQL) - User and photo analytics queries - Format GROUP BY analytics queries
27 lines
819 B
Bash
Executable File
27 lines
819 B
Bash
Executable File
#!/bin/bash
|
|
# Run tests locally, skipping Bluesky tests that require external API credentials
|
|
|
|
echo "Running tests locally (skipping Bluesky tests)..."
|
|
echo "================================================"
|
|
|
|
# Run Django tests excluding the Bluesky test file
|
|
python3 manage.py test \
|
|
ivatar.ivataraccount.test_auth \
|
|
ivatar.ivataraccount.test_views \
|
|
ivatar.test_auxiliary \
|
|
ivatar.test_file_security \
|
|
ivatar.test_static_pages \
|
|
ivatar.test_utils \
|
|
ivatar.test_views \
|
|
ivatar.test_views_stats \
|
|
ivatar.tools.test_views \
|
|
ivatar.test_wsgi \
|
|
-v2
|
|
|
|
echo ""
|
|
echo "To run all tests including Bluesky (requires API credentials):"
|
|
echo "python3 manage.py test -v2"
|
|
echo ""
|
|
echo "To run only Bluesky tests:"
|
|
echo "python3 manage.py test ivatar.ivataraccount.test_views_bluesky -v2"
|