Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update println! and eprintln! to info using tracing cargo. #1309

Merged

Conversation

devworlds
Copy link

Update mining-device-sv1 from println! to info! using tracing following mining-device as example.

the issue: #1286

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 19.29%. Comparing base (1351618) to head (3ac79b1).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
roles/test-utils/mining-device-sv1/src/miner.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1309   +/-   ##
=======================================
  Coverage   19.29%   19.29%           
=======================================
  Files         164      164           
  Lines       10852    10852           
=======================================
  Hits         2094     2094           
  Misses       8758     8758           
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.65% <ø> (ø)
binary_sv2-coverage 5.48% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.29% <ø> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 7.79% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.49% <ø> (-0.02%) ⬇️
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.35% <ø> (ø)
pool_sv2-coverage 1.38% <ø> (ø)
protocols 24.72% <ø> (ø)
roles 6.54% <0.00%> (ø)
roles_logic_sv2-coverage 8.08% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.60% <ø> (ø)
utils 25.13% <ø> (ø)
v1-coverage 2.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 19, 2024

🐰 Bencher Report

Branchfeature/update-println-to-info
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
44.55
(-1.41%)
58.90
(75.64%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
72.64
(-6.92%)
104.86
(69.27%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.66
(+0.03%)
14.71
(99.68%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
271.11
(+1.50%)
290.32
(93.38%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
613.67
(+0.06%)
650.08
(94.40%)
client_sv2_open_channel📈 view plot
🚷 view threshold
167.52
(+1.49%)
176.42
(94.95%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
282.10
(-1.18%)
310.60
(90.82%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
378.46
(-1.39%)
409.48
(92.42%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
164.01
(+2.32%)
171.81
(95.46%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
464.19
(-1.48%)
550.74
(84.29%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
971.50
(-2.62%)
1,145.33
(84.82%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 19, 2024

🐰 Bencher Report

Branchfeature/update-println-to-info
Testbedsv1

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
serialize_deserialize_submitRAM Accesses
accesses
📈 plot
🚨 alert (🔔)
🚷 threshold
503.00
(+2.07%)
502.06
(100.19%)
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,448.00
(-0.10%)
8,676.78
(97.36%)
📈 view plot
🚷 view threshold
3,663.00
(-1.87%)
3,862.95
(94.82%)
📈 view plot
🚷 view threshold
5,108.00
(-2.29%)
5,448.60
(93.75%)
📈 view plot
🚷 view threshold
10.00
(+24.27%)
15.55
(64.31%)
📈 view plot
🚷 view threshold
94.00
(+3.18%)
96.09
(97.83%)
get_submit📈 view plot
🚷 view threshold
95,392.00
(+0.02%)
95,704.84
(99.67%)
📈 view plot
🚷 view threshold
59,263.00
(-0.27%)
59,711.26
(99.25%)
📈 view plot
🚷 view threshold
85,072.00
(-0.31%)
85,824.20
(99.12%)
📈 view plot
🚷 view threshold
48.00
(+8.34%)
59.58
(80.56%)
📈 view plot
🚷 view threshold
288.00
(+2.69%)
290.63
(99.09%)
get_subscribe📈 view plot
🚷 view threshold
7,961.00
(-0.55%)
8,234.94
(96.67%)
📈 view plot
🚷 view threshold
2,758.00
(-2.20%)
2,943.41
(93.70%)
📈 view plot
🚷 view threshold
3,831.00
(-2.67%)
4,143.49
(92.46%)
📈 view plot
🚷 view threshold
14.00
(+15.61%)
20.04
(69.86%)
📈 view plot
🚷 view threshold
116.00
(+1.28%)
117.83
(98.45%)
serialize_authorize📈 view plot
🚷 view threshold
12,267.00
(+0.01%)
12,510.46
(98.05%)
📈 view plot
🚷 view threshold
5,240.00
(-1.24%)
5,427.64
(96.54%)
📈 view plot
🚷 view threshold
7,277.00
(-1.56%)
7,603.76
(95.70%)
📈 view plot
🚷 view threshold
11.00
(+11.83%)
18.36
(59.92%)
📈 view plot
🚷 view threshold
141.00
(+2.28%)
142.35
(99.05%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,742.00
(+0.12%)
25,181.03
(98.26%)
📈 view plot
🚷 view threshold
9,786.00
(-0.82%)
10,021.43
(97.65%)
📈 view plot
🚷 view threshold
13,782.00
(-1.03%)
14,186.30
(97.15%)
📈 view plot
🚷 view threshold
36.00
(+1.34%)
45.47
(79.17%)
📈 view plot
🚷 view threshold
308.00
(+1.60%)
313.30
(98.31%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,333.00
(+0.01%)
30,714.36
(98.76%)
📈 view plot
🚷 view threshold
11,989.00
(-0.58%)
12,194.50
(98.31%)
📈 view plot
🚷 view threshold
16,948.00
(-0.74%)
17,302.98
(97.95%)
📈 view plot
🚷 view threshold
59.00
(+6.05%)
67.04
(88.01%)
📈 view plot
🚷 view threshold
374.00
(+0.87%)
379.20
(98.63%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,580.00
(+0.09%)
126,779.95
(99.84%)
📈 view plot
🚷 view threshold
73,117.00
(-0.20%)
73,527.14
(99.44%)
📈 view plot
🚷 view threshold
104,760.00
(-0.25%)
105,494.21
(99.30%)
📈 view plot
🚷 view threshold
108.00
(+1.93%)
124.65
(86.64%)
📈 view plot
🚷 view threshold
608.00
(+1.76%)
608.34
(99.94%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,969.00
(+0.23%)
28,421.21
(98.41%)
📈 view plot
🚷 view threshold
9,577.00
(-0.63%)
9,757.99
(98.15%)
📈 view plot
🚷 view threshold
13,514.00
(-0.82%)
13,834.05
(97.69%)
📈 view plot
🚷 view threshold
70.00
(+9.15%)
77.27
(90.60%)
📈 view plot
🚷 view threshold
403.00
(+1.05%)
411.07
(98.04%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,313.00
(+0.06%)
115,719.54
(99.65%)
📈 view plot
🚷 view threshold
67,894.00
(-0.26%)
68,417.74
(99.23%)
📈 view plot
🚷 view threshold
97,353.00
(-0.33%)
98,282.01
(99.05%)
📈 view plot
🚷 view threshold
71.00
(+10.55%)
85.14
(83.39%)
📈 view plot
🚨 view alert (🔔)
🚷 view threshold
503.00
(+2.07%)
502.06
(100.19%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,362.00
(+0.18%)
23,838.98
(98.00%)
📈 view plot
🚷 view threshold
8,129.00
(-0.77%)
8,314.37
(97.77%)
📈 view plot
🚷 view threshold
11,417.00
(-1.01%)
11,742.57
(97.23%)
📈 view plot
🚷 view threshold
44.00
(+14.52%)
49.99
(88.02%)
📈 view plot
🚷 view threshold
335.00
(+1.13%)
343.16
(97.62%)
serialize_submit📈 view plot
🚷 view threshold
99,883.00
(+0.08%)
100,157.14
(99.73%)
📈 view plot
🚷 view threshold
61,325.00
(-0.24%)
61,737.65
(99.33%)
📈 view plot
🚷 view threshold
87,928.00
(-0.29%)
88,651.64
(99.18%)
📈 view plot
🚷 view threshold
53.00
(+11.97%)
65.52
(80.90%)
📈 view plot
🚷 view threshold
334.00
(+2.71%)
335.97
(99.41%)
serialize_subscribe📈 view plot
🚷 view threshold
11,482.00
(+0.68%)
11,608.35
(98.91%)
📈 view plot
🚷 view threshold
4,111.00
(-1.39%)
4,283.68
(95.97%)
📈 view plot
🚷 view threshold
5,687.00
(-1.84%)
5,996.84
(94.83%)
📈 view plot
🚷 view threshold
18.00
(+34.27%)
22.93
(78.49%)
📈 view plot
🚷 view threshold
163.00
(+2.92%)
163.75
(99.54%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 19, 2024

🐰 Bencher Report

Branchfeature/update-println-to-info
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client-submit-serialize📈 view plot
🚷 view threshold
6,541.40
(-0.90%)
6,943.30
(94.21%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,392.10
(-0.82%)
7,893.90
(93.64%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
7,959.30
(-1.98%)
9,326.90
(85.34%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
880.21
(+1.54%)
942.25
(93.42%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
665.56
(-1.13%)
714.85
(93.11%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
254.43
(+2.06%)
271.08
(93.86%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
157.05
(-0.23%)
166.40
(94.38%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,237.70
(-2.22%)
6,859.66
(90.93%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
283.98
(+0.53%)
325.46
(87.25%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
737.20
(+1.41%)
776.06
(94.99%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
581.98
(-1.08%)
622.19
(93.54%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
202.97
(-1.70%)
224.20
(90.53%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Dec 19, 2024

🐰 Bencher Report

Branchfeature/update-println-to-info
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
2,099.00
(-0.45%)
2,224.95
(94.34%)
📈 view plot
🚷 view threshold
473.00
(-0.05%)
488.96
(96.74%)
📈 view plot
🚷 view threshold
734.00
(-0.23%)
757.93
(96.84%)
📈 view plot
🚷 view threshold
7.00
(+39.35%)
12.19
(57.40%)
📈 view plot
🚷 view threshold
38.00
(-1.32%)
41.51
(91.54%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,360.00
(+1.70%)
8,385.61
(99.69%)
📈 view plot
🚷 view threshold
2,137.00
(-0.01%)
2,141.28
(99.80%)
📈 view plot
🚷 view threshold
3,150.00
(-0.30%)
3,170.06
(99.37%)
📈 view plot
🚷 view threshold
41.00
(+15.44%)
41.80
(98.08%)
📈 view plot
🚷 view threshold
143.00
(+2.49%)
144.10
(99.24%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,361.00
(+1.00%)
6,442.69
(98.73%)
📈 view plot
🚷 view threshold
1,750.00
(-0.03%)
1,766.56
(99.06%)
📈 view plot
🚷 view threshold
2,546.00
(-0.23%)
2,575.07
(98.87%)
📈 view plot
🚷 view threshold
21.00
(+23.08%)
24.25
(86.61%)
📈 view plot
🚷 view threshold
106.00
(+1.34%)
108.61
(97.60%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,832.00
(+0.73%)
14,939.82
(99.28%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,710.56
(99.65%)
📈 view plot
🚷 view threshold
6,742.00
(-0.22%)
6,786.02
(99.35%)
📈 view plot
🚷 view threshold
57.00
(+27.22%)
60.66
(93.96%)
📈 view plot
🚷 view threshold
223.00
(+0.79%)
226.55
(98.43%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,808.00
(+0.82%)
27,997.33
(99.32%)
📈 view plot
🚷 view threshold
10,645.00
(+0.41%)
10,684.50
(99.63%)
📈 view plot
🚷 view threshold
15,498.00
(+0.44%)
15,570.30
(99.54%)
📈 view plot
🚷 view threshold
96.00
(+15.65%)
97.73
(98.23%)
📈 view plot
🚷 view threshold
338.00
(+0.81%)
342.45
(98.70%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,413.00
(+0.51%)
4,548.23
(97.03%)
📈 view plot
🚷 view threshold
1,461.00
(-0.02%)
1,476.96
(98.92%)
📈 view plot
🚷 view threshold
2,158.00
(-0.12%)
2,183.65
(98.83%)
📈 view plot
🚷 view threshold
10.00
(+22.84%)
13.85
(72.19%)
📈 view plot
🚷 view threshold
63.00
(+0.71%)
66.96
(94.08%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,028.00
(+0.08%)
14,192.82
(98.84%)
📈 view plot
🚷 view threshold
5,064.00
(-0.00%)
5,079.96
(99.69%)
📈 view plot
🚷 view threshold
7,323.00
(-0.04%)
7,351.38
(99.61%)
📈 view plot
🚷 view threshold
39.00
(+8.64%)
46.86
(83.22%)
📈 view plot
🚷 view threshold
186.00
(-0.03%)
191.03
(97.36%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,782.00
(+0.43%)
22,986.76
(99.11%)
📈 view plot
🚷 view threshold
8,040.00
(+0.12%)
8,053.45
(99.83%)
📈 view plot
🚷 view threshold
11,692.00
(+0.08%)
11,711.09
(99.84%)
📈 view plot
🚷 view threshold
83.00
(+10.41%)
87.98
(94.33%)
📈 view plot
🚷 view threshold
305.00
(+0.47%)
310.82
(98.13%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,673.00
(-0.30%)
4,784.40
(97.67%)
📈 view plot
🚷 view threshold
1,502.00
(-0.02%)
1,517.96
(98.95%)
📈 view plot
🚷 view threshold
2,278.00
(-0.01%)
2,299.52
(99.06%)
📈 view plot
🚷 view threshold
10.00
(+5.18%)
15.78
(63.36%)
📈 view plot
🚷 view threshold
67.00
(-0.69%)
69.99
(95.72%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,206.00
(+0.35%)
16,306.91
(99.38%)
📈 view plot
🚷 view threshold
5,963.00
(-0.00%)
5,978.96
(99.73%)
📈 view plot
🚷 view threshold
8,656.00
(-0.09%)
8,691.58
(99.59%)
📈 view plot
🚷 view threshold
47.00
(+17.41%)
54.30
(86.55%)
📈 view plot
🚷 view threshold
209.00
(+0.41%)
211.88
(98.64%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,778.00
(+0.55%)
35,896.03
(99.67%)
📈 view plot
🚷 view threshold
14,888.00
(+0.16%)
14,911.09
(99.85%)
📈 view plot
🚷 view threshold
21,868.00
(+0.13%)
21,909.46
(99.81%)
📈 view plot
🚷 view threshold
108.00
(+16.19%)
115.34
(93.64%)
📈 view plot
🚷 view threshold
382.00
(+0.68%)
385.10
(99.20%)
🐰 View full continuous benchmarking report in Bencher

@plebhash plebhash force-pushed the feature/update-println-to-info branch from 38de495 to da7a765 Compare December 19, 2024 09:55
@plebhash
Copy link
Collaborator

thanks @devworlds

I rebased the commit history to make it a bit cleaner, and also switched some info! for error! and warn!

just waiting for CI so I can merge it

@plebhash plebhash force-pushed the feature/update-println-to-info branch from da7a765 to 3ac79b1 Compare December 19, 2024 09:57
@plebhash plebhash merged commit fd1b488 into stratum-mining:main Dec 19, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants