upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'grasp-audit/src/bin')
-rw-r--r--grasp-audit/src/bin/grasp-audit.rs28
1 files changed, 6 insertions, 22 deletions
diff --git a/grasp-audit/src/bin/grasp-audit.rs b/grasp-audit/src/bin/grasp-audit.rs
index f56fc44..9bd7826 100644
--- a/grasp-audit/src/bin/grasp-audit.rs
+++ b/grasp-audit/src/bin/grasp-audit.rs
@@ -115,18 +115,10 @@ async fn main() -> Result<()> {
115 if !json { 115 if !json {
116 println!("\n[Run {}]", run); 116 println!("\n[Run {}]", run);
117 } 117 }
118 let start = std::time::Instant::now(); 118 let report = grasp_audit::probe::run_probe(
119 let report = tokio::time::timeout( 119 &relay, keys.clone(), read_only, timeout, overall_secs,
120 Duration::from_secs(overall_secs),
121 grasp_audit::probe::run_probe(&relay, keys.clone(), read_only, timeout),
122 ) 120 )
123 .await 121 .await;
124 .unwrap_or_else(|_| {
125 grasp_audit::probe::ProbeReport::overall_timeout(
126 &relay,
127 start.elapsed().as_millis() as u64,
128 )
129 });
130 if json { 122 if json {
131 report.print_json(); 123 report.print_json();
132 } else { 124 } else {
@@ -136,18 +128,10 @@ async fn main() -> Result<()> {
136 tokio::time::sleep(Duration::from_secs(interval)).await; 128 tokio::time::sleep(Duration::from_secs(interval)).await;
137 } 129 }
138 } else { 130 } else {
139 let start = std::time::Instant::now(); 131 let report = grasp_audit::probe::run_probe(
140 let report = tokio::time::timeout( 132 &relay, keys, read_only, timeout, overall_secs,
141 Duration::from_secs(overall_secs),
142 grasp_audit::probe::run_probe(&relay, keys, read_only, timeout),
143 ) 133 )
144 .await 134 .await;
145 .unwrap_or_else(|_| {
146 grasp_audit::probe::ProbeReport::overall_timeout(
147 &relay,
148 start.elapsed().as_millis() as u64,
149 )
150 });
151 if json { 135 if json {
152 report.print_json(); 136 report.print_json();
153 } else { 137 } else {