Skip to content

Commit

Permalink
add the total number of requests as getter
Browse files Browse the repository at this point in the history
  • Loading branch information
bararchy committed Dec 28, 2023
1 parent 8b5a746 commit 400a506
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sec_tester/scan.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module SecTester
getter issues
getter entry_points : Atomic(Int32) = Atomic.new(0)
getter total_params : Atomic(Int32) = Atomic.new(0)
getter total_requests : Atomic(Int64) = Atomic.new(0)
getter scan_status : String = ""
getter base_url : String = ENV["CLUSTER_URL"]? || "https://app.brightsec.com"

Expand Down Expand Up @@ -130,6 +131,7 @@ module SecTester
@scan_duration = (response_json["elapsed"].as_i64.milliseconds rescue 0.milliseconds) # From time to times the API will send strange values
@entry_points.set(response_json["entryPoints"].as_i)
@total_params.set(response_json["totalParams"].as_i)
@total_requests.set(response_json["requests"].as_i64)
get_issues.each { |issue| @issues << issue unless @issues.includes?(issue) }
@scan_status = response_json["status"].as_s

Expand Down

0 comments on commit 400a506

Please sign in to comment.