golemfactory / concent

Repository for Concent Service sources
8 stars 7 forks source link

Prepare django admin view and template for payment report #1069

Open rwrzesien opened 5 years ago

rwrzesien commented 5 years ago

This is created as a part of https://github.com/golemfactory/concent/issues/1044

Once the backend part of the report is ready, it should be displayed in admin panel. As the data is not taken from queryset, I think it would be necessary to create also a separate admin view along with the html template.

The general guidelines were defined in related issue:

  1. Use colors. Mark wrong amounts, wrong timestamps or unmatched messages in red.
  2. Use tables. You could have a row for each message or payment. Message details would be in columns on the left and payment details in columns on the right. Common things like values and timestamps could be in the center.
  3. If you have your own ideas that would make the report more concise and readable, use them but please drop a note in comment below the issue first.
PaweuB commented 5 years ago

Pivotal: https://www.pivotaltracker.com/story/show/163292234

Jakub89 commented 5 years ago

Just for the record about time it take, to generate whole report on GETH_ADDRESS = 'https://rinkeby.golem.network:55555':

regular_payments in:  3.284846067428589
settlement_payments in:  2.7103161811828613
forced_subtask_payments in:  2.5918567180633545
additional_verification_payments_for_requestor in:  2.5945217609405518
additional_verification_payments_for_provider in:  2.641995668411255
Sum - related payments for subtask 1 in:  13.824137210845947

regular_payments in:  2.978281021118164
settlement_payments in:  2.505110502243042
forced_subtask_payments in:  2.698831796646118
additional_verification_payments_for_requestor in:  2.89158296585083
additional_verification_payments_for_provider in:  2.501680850982666
Sum - related payments for subtask 2 in:  13.57610297203064

total time:  27.51136088371277
16:55:32 INFO     | "GET /admin/payment_report/ HTTP/1.1" 200 2823

Every requestor-provider pair needs 5 sci calls, where each takes 2-4 second(on my potato laptop). total time include also all the database calls in create_report() from both pairs , which takes around 0.1 second.