Skip to content
Merged

Dev #34

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
15f86ad
Update performance test results [skip ci]
actions-user Oct 21, 2025
25d81a9
Implement NeuronsPartHere query and corresponding test script
Robbie1977 Nov 4, 2025
ced6903
Update performance test results [skip ci]
actions-user Nov 4, 2025
ca748cc
Increase preview results to 10 in NeuronsPartHere query and add compr…
Robbie1977 Nov 4, 2025
a2ac3da
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 4, 2025
3ec0711
Update performance test results [skip ci]
actions-user Nov 4, 2025
e301f6e
Add comprehensive reference documentation for VFB queries
Robbie1977 Nov 4, 2025
15fe254
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 4, 2025
63c0e45
Update performance test results [skip ci]
actions-user Nov 4, 2025
6fe0da0
Implement new Owlery-based queries and corresponding tests
Robbie1977 Nov 4, 2025
c0d9456
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 4, 2025
bcef10c
Update performance test results [skip ci]
actions-user Nov 4, 2025
f6e1315
Update Owlery queries to use IRI syntax and modify test cases for Sub…
Robbie1977 Nov 5, 2025
86bb48e
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
1f9df76
Update performance test results [skip ci]
actions-user Nov 5, 2025
ceb3a68
Enhance get_term_info function to support preview parameter for faste…
Robbie1977 Nov 5, 2025
9ddce50
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
49185c8
Update performance test results [skip ci]
actions-user Nov 5, 2025
efcfd9b
Enhance caching mechanism for term_info queries by including preview …
Robbie1977 Nov 5, 2025
57a62e9
Update performance test results [skip ci]
actions-user Nov 5, 2025
996e297
Add conditional validation for cached results based on preview parameter
Robbie1977 Nov 5, 2025
4906e44
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
19e9770
Update performance test results [skip ci]
actions-user Nov 5, 2025
ed15a7d
Refactor caching logic to include query type in cache document ID and…
Robbie1977 Nov 5, 2025
c9e72df
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
ab6baa9
Update performance test results [skip ci]
actions-user Nov 5, 2025
7150f8f
Add debug logging for Owlery query execution and error handling
Robbie1977 Nov 5, 2025
172ba5a
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
c860d37
Update performance test results [skip ci]
actions-user Nov 5, 2025
c6708c2
Enhance error handling in Owlery queries and update count logic in ca…
Robbie1977 Nov 5, 2025
c114f3d
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
9b103eb
Improve error handling in Owlery queries by adding debug URL construc…
Robbie1977 Nov 5, 2025
bc14393
Update performance test results [skip ci]
actions-user Nov 5, 2025
09583f2
Enhance caching logic in SolrResultCache and implement SimpleVFBConne…
Robbie1977 Nov 5, 2025
ff9724b
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
44f2f33
Update performance test results [skip ci]
actions-user Nov 5, 2025
7b9f504
Enhance fill_query_results to include count in preview results
Robbie1977 Nov 5, 2025
dad9ec5
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
a95c621
Update performance test results [skip ci]
actions-user Nov 5, 2025
47ec9a8
Enhance caching logic in SolrResultCache to prevent caching of error …
Robbie1977 Nov 5, 2025
5b184e4
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
c3003e0
Update performance test results [skip ci]
actions-user Nov 5, 2025
8cf0e53
Enhance SolrResultCache to validate cached results and reject errors;…
Robbie1977 Nov 5, 2025
3d02d81
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
b1a0237
Update performance test results [skip ci]
actions-user Nov 5, 2025
9d17e10
Enhance with_solr_cache function to track and handle error results; c…
Robbie1977 Nov 5, 2025
08c79ab
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 5, 2025
bbda431
Update performance test results [skip ci]
actions-user Nov 5, 2025
c394908
Add minimal fallback implementation for get_templates when Neo4j is u…
Robbie1977 Nov 6, 2025
d5c4d54
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
de41ff1
Update performance test results [skip ci]
actions-user Nov 6, 2025
a7b5708
Refactor Neo4j client handling: implement fallback to mock client whe…
Robbie1977 Nov 6, 2025
82e638d
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
3889502
Update performance test results [skip ci]
actions-user Nov 6, 2025
eae6162
Enhance _get_templates_minimal and get_templates functions: include a…
Robbie1977 Nov 6, 2025
879901a
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
fe6454f
Update performance test results [skip ci]
actions-user Nov 6, 2025
0f4d472
Refactor get_templates query: adjust Cypher pattern and improve licen…
Robbie1977 Nov 6, 2025
323cd7d
Update performance test results [skip ci]
actions-user Nov 6, 2025
8c3a3dc
Refactor get_templates function: streamline formatting of results for…
Robbie1977 Nov 6, 2025
2cf6a0e
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
8f62360
Update performance test results [skip ci]
actions-user Nov 6, 2025
1e8d225
Update README.md: enhance thumbnail URLs and add new neuron queries f…
Robbie1977 Nov 6, 2025
fab46e9
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
6156f50
Update performance test results [skip ci]
actions-user Nov 6, 2025
f0cdd36
Enhance get_templates function: aggregate datasets and licenses for i…
Robbie1977 Nov 6, 2025
a6f0817
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
35f8776
Update performance test results [skip ci]
actions-user Nov 6, 2025
ebe9e85
Refactor fill_query_results: store count at query level instead of in…
Robbie1977 Nov 6, 2025
c6daeee
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
a79c002
Update performance test results [skip ci]
actions-user Nov 6, 2025
f0aa380
Refactor get_instances function: update Cypher query pattern for impr…
Robbie1977 Nov 6, 2025
16022a7
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
66ce8c5
Update performance test results [skip ci]
actions-user Nov 6, 2025
a0800ad
Enhance encode_markdown_links function to handle multiple comma-separ…
Robbie1977 Nov 6, 2025
16ca842
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
b8565c4
Update performance test results [skip ci]
actions-user Nov 6, 2025
03b8859
Refactor template entries in README.md to update dataset and license …
Robbie1977 Nov 6, 2025
0c031b6
Update performance test results [skip ci]
actions-user Nov 6, 2025
f4491d7
Fix missing newline at end of README.md
Robbie1977 Nov 6, 2025
30dec1d
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
bdd5547
Update performance test results [skip ci]
actions-user Nov 6, 2025
32a0caa
Update order field in template metadata and correct entry order in RE…
Robbie1977 Nov 6, 2025
017cb43
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
d7fa77a
Update performance test results [skip ci]
actions-user Nov 6, 2025
4457ed4
Update template metadata with new entries and correct order values
Robbie1977 Nov 6, 2025
e852ffb
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
7723ce0
Update performance test results [skip ci]
actions-user Nov 6, 2025
3d3a8dd
Add test suites for NeuronClassesFasciculatingHere, LineageClonesIn, …
Robbie1977 Nov 6, 2025
bcf8be8
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
a27bdae
Update performance test results [skip ci]
actions-user Nov 6, 2025
160079a
Refactor performance tests to include new queries and improve reporting
Robbie1977 Nov 6, 2025
9f15e30
Update performance test results [skip ci]
actions-user Nov 6, 2025
5dfeb63
Implement ImagesNeurons query and associated tests; update Owlery cli…
Robbie1977 Nov 6, 2025
e9345a3
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
a955327
Update performance test results [skip ci]
actions-user Nov 6, 2025
2520317
Reduce preview results from 10 to 5 in neuron-related schema functions
Robbie1977 Nov 6, 2025
bd34665
Merge branch 'dev' of https://github.com/VirtualFlyBrain/VFBquery int…
Robbie1977 Nov 6, 2025
91a0f36
Update performance test results [skip ci]
actions-user Nov 6, 2025
1999824
Merge branch 'main' into dev
Robbie1977 Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 78 additions & 33 deletions .github/workflows/performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ jobs:

- name: Run Performance Test
run: |
export PYTHONPATH=$PYTHONPATH:$PWD/
echo "Running performance test for term info queries..."
python -m unittest -v src.test.term_info_queries_test.TermInfoQueriesTest.test_term_info_performance 2>&1 | tee performance_test_output.log
continue-on-error: true # Continue even if performance thresholds are exceeded
python -m unittest src.test.test_query_performance -v 2>&1 | tee performance_test_output.log

- name: Run Legacy Performance Test
run: |
python -m unittest -v src.test.term_info_queries_test.TermInfoQueriesTest.test_term_info_performance 2>&1 | tee -a performance_test_output.log

- name: Create Performance Report
if: always() # Always run this step, even if the test fails
Expand All @@ -46,63 +47,107 @@ jobs:
**Test Date:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
**Git Commit:** ${{ github.sha }}
**Branch:** ${{ github.ref_name }}
**Workflow Run:** ${{ github.run_id }}
**Workflow Run:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})

## Test Overview

This performance test measures the execution time of VFB term info queries for specific terms:
This performance test measures the execution time of all implemented VFB queries including:

### Core Queries
- **Term Info Queries**: Basic term information retrieval
- **Neuron Part Queries**: Neurons with parts overlapping regions
- **Synaptic Terminal Queries**: Pre/post synaptic terminals
- **Anatomical Hierarchy**: Components, parts, subclasses
- **Instance Queries**: Available images and instances

- **FBbt_00003748**: mushroom body (anatomical class)
- **VFB_00101567**: individual anatomy data
### New Queries (2025)
- **NeuronClassesFasciculatingHere**: Neurons fasciculating with tracts
- **TractsNervesInnervatingHere**: Tracts/nerves innervating neuropils
- **LineageClonesIn**: Lineage clones in neuropils

## Performance Thresholds

- Maximum single query time: 2 seconds
- Maximum total time for both queries: 4 seconds
- **Fast queries**: < 1 second (SOLR lookups)
- **Medium queries**: < 3 seconds (Owlery + SOLR)
- **Slow queries**: < 10 seconds (Neo4j + complex processing)

## Test Results

```
\`\`\`
$(cat performance_test_output.log)
```
\`\`\`

## Summary

EOF

# Extract timing information from the test output
if grep -q "Performance Test Results:" performance_test_output.log; then
echo "✅ **Test Status**: Performance test completed" >> performance.md
# Check overall test status
if grep -q "OK" performance_test_output.log || grep -q "Ran.*test" performance_test_output.log; then
echo "✅ **Test Status**: Performance tests completed" >> performance.md
echo "" >> performance.md

# Extract timing data
if grep -q "FBbt_00003748 query took:" performance_test_output.log; then
TIMING1=$(grep "FBbt_00003748 query took:" performance_test_output.log | sed 's/.*took: \([0-9.]*\) seconds.*/\1/')
echo "- **FBbt_00003748 Query Time**: ${TIMING1} seconds" >> performance.md
fi
# Count successes and failures
TOTAL_TESTS=$(grep -c "^test_" performance_test_output.log || echo "0")
FAILED_TESTS=$(grep -c "FAIL:" performance_test_output.log || echo "0")
ERROR_TESTS=$(grep -c "ERROR:" performance_test_output.log || echo "0")
PASSED_TESTS=$((TOTAL_TESTS - FAILED_TESTS - ERROR_TESTS))

if grep -q "VFB_00101567 query took:" performance_test_output.log; then
TIMING2=$(grep "VFB_00101567 query took:" performance_test_output.log | sed 's/.*took: \([0-9.]*\) seconds.*/\1/')
echo "- **VFB_00101567 Query Time**: ${TIMING2} seconds" >> performance.md
fi
echo "### Test Statistics" >> performance.md
echo "" >> performance.md
echo "- **Total Tests**: ${TOTAL_TESTS}" >> performance.md
echo "- **Passed**: ${PASSED_TESTS} ✅" >> performance.md
echo "- **Failed**: ${FAILED_TESTS} ❌" >> performance.md
echo "- **Errors**: ${ERROR_TESTS} ⚠️" >> performance.md
echo "" >> performance.md

# Extract timing information for key queries
echo "### Query Performance Details" >> performance.md
echo "" >> performance.md

if grep -q "Total time for both queries:" performance_test_output.log; then
TOTAL_TIME=$(grep "Total time for both queries:" performance_test_output.log | sed 's/.*queries: \([0-9.]*\) seconds.*/\1/')
echo "- **Total Query Time**: ${TOTAL_TIME} seconds" >> performance.md
# Extract all timing lines
if grep -q "seconds" performance_test_output.log; then
echo "| Query | Duration | Status |" >> performance.md
echo "|-------|----------|--------|" >> performance.md

# Parse timing information
grep -E "^(get_term_info|NeuronsPartHere|NeuronsSynaptic|NeuronsPresynapticHere|NeuronsPostsynapticHere|ComponentsOf|PartsOf|SubclassesOf|NeuronClassesFasciculatingHere|TractsNervesInnervatingHere|LineageClonesIn|ListAllAvailableImages):" performance_test_output.log | while read line; do
QUERY=$(echo "$line" | sed 's/:.*//')
DURATION=$(echo "$line" | sed 's/.*: \([0-9.]*\)s.*/\1/')
if echo "$line" | grep -q "✅"; then
STATUS="✅ Pass"
else
STATUS="❌ Fail"
fi
echo "| $QUERY | ${DURATION}s | $STATUS |" >> performance.md
done
fi

# Check if test passed or failed
if grep -q "OK" performance_test_output.log; then
echo "" >> performance.md
echo "" >> performance.md

# Overall result
if [ "$FAILED_TESTS" -eq "0" ] && [ "$ERROR_TESTS" -eq "0" ]; then
echo "🎉 **Result**: All performance thresholds met!" >> performance.md
elif grep -q "FAILED" performance_test_output.log; then
else
echo "⚠️ **Result**: Some performance thresholds exceeded or tests failed" >> performance.md
echo "" >> performance.md
echo "⚠️ **Result**: Some performance thresholds exceeded or test failed" >> performance.md
echo "Please review the failed tests above. Common causes:" >> performance.md
echo "- Network latency to VFB services" >> performance.md
echo "- SOLR/Neo4j/Owlery server load" >> performance.md
echo "- First-time cache population (expected to be slower)" >> performance.md
fi
else
echo "❌ **Test Status**: Performance test failed to run properly" >> performance.md
echo "❌ **Test Status**: Performance tests failed to run properly" >> performance.md
echo "" >> performance.md
echo "Please check the test output above for errors." >> performance.md
fi

echo "" >> performance.md
echo "---" >> performance.md
echo "" >> performance.md
echo "## Historical Performance" >> performance.md
echo "" >> performance.md
echo "Track performance trends across commits:" >> performance.md
echo "- [GitHub Actions History](https://github.com/${{ github.repository }}/actions/workflows/performance-test.yml)" >> performance.md
echo "" >> performance.md
echo "---" >> performance.md
echo "*Last updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')*" >> performance.md
Expand Down
Loading