tjb-altf4 / spacemesh-psm

Spacemesh monitoring, and intelligent management of post-services
Apache License 2.0
0 stars 0 forks source link

override proving runtime estimates with actual runtimes from logs #15

Open tjb-altf4 opened 1 month ago

tjb-altf4 commented 1 month ago

update estimated runtimes with actual times captured in post-service logs

sample:

[2024-10-08T22:04:07Z INFO  post::reader] Reading file: /root/post/postdata_173.bin
[2024-10-08T22:04:26Z INFO  post::prove] finished reading POST data in 628m 59s
[2024-10-08T22:04:26Z INFO  post::prove] found proof for nonce: 26, pow: 1234567890 with [.....] indices. It took 690m 10s
[2024-10-08T22:04:28Z INFO  post_service::service] proof generation is finished
[2024-10-08T22:04:28Z INFO  post_service::client] proof generation finished
[2024-10-08T22:04:28Z INFO  post_service::client] verifying proof
[2024-10-08T22:04:29Z INFO  post_service::client] proof is valid (verification took: 0.886565934s)

total = "It took 690m 10s" phase 2 = "finished reading POST data in 628m 59s" phase 1 = "690m 10s" minus "628m 59s"