Skip to content

Conversation

BlairCurrey
Copy link
Contributor

@BlairCurrey BlairCurrey commented Sep 30, 2025

@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. type: source Changes business logic labels Sep 30, 2025
@BlairCurrey BlairCurrey changed the title Blair/raf 1036 feat: handle grant spent amount calculation on payment completion Oct 7, 2025
Copy link

github-actions bot commented Oct 7, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 43.67
  • Iterations/s: 14.57
  • Failed Requests: 0.00% (0 of 2628)
📜 Logs

> performance@1.0.0 run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 916 kB 15 kB/s
     data_sent......................: 1.9 MB 31 kB/s
     http_req_blocked...............: avg=7.1µs    min=1.78µs   med=5.48µs   max=1.02ms   p(90)=6.56µs   p(95)=7.19µs  
     http_req_connecting............: avg=694ns    min=0s       med=0s       max=971.58µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=90.9ms   min=11.56ms  med=76.51ms  max=586.23ms p(90)=155.69ms p(95)=181.69ms
       { expected_response:true }...: avg=90.9ms   min=11.56ms  med=76.51ms  max=586.23ms p(90)=155.69ms p(95)=181.69ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2628
     http_req_receiving.............: avg=91.2µs   min=26.5µs   med=79.53µs  max=1.42ms   p(90)=117.62µs p(95)=148.75µs
     http_req_sending...............: avg=35.51µs  min=9.16µs   med=28.62µs  max=1.63ms   p(90)=41.16µs  p(95)=58.19µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=90.77ms  min=11.44ms  med=76.24ms  max=586.15ms p(90)=155.6ms  p(95)=181.6ms 
     http_reqs......................: 2628   43.670077/s
     iteration_duration.............: avg=274.05ms min=179.02ms med=258.51ms max=1.19s    p(90)=337.16ms p(95)=360.69ms
     iterations.....................: 877    14.573309/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

Comment on lines 199 to 201
const settledDebitAmount = await deps.accountingService.getTotalSent(
payment.id
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we return the sent/debit amount from the payment method, we can avoid this call to the accounting DB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. type: source Changes business logic type: tests Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants