@@ -133,9 +133,6 @@ class MonitoringStats {
133133 public:
134134 static MonitoringStats &instance ();
135135
136- // Get a reference to issuer stats for periodic updates
137- IssuerStats* get_issuer_stats (const std::string &issuer);
138-
139136 void record_validation_success (const std::string &issuer,
140137 double duration_s);
141138 void record_validation_failure (const std::string &issuer,
@@ -486,7 +483,6 @@ class Validator {
486483 void verify (const SciToken &scitoken, time_t expiry_time) {
487484 std::string issuer = " " ;
488485 auto start_time = std::chrono::steady_clock::now ();
489- internal::IssuerStats* stats_ptr = nullptr ;
490486
491487 try {
492488 auto result = verify_async (scitoken);
@@ -496,12 +492,11 @@ class Validator {
496492 scitoken.m_decoded .get ();
497493 if (jwt_decoded && jwt_decoded->has_payload_claim (" iss" )) {
498494 issuer = jwt_decoded->get_issuer ();
499- stats_ptr = internal::MonitoringStats::instance ().get_issuer_stats (issuer);
500495 }
501496
502497 while (!result->m_done ) {
503498 auto timeout_val = result->get_timeout_val (expiry_time);
504- // Limit select to 50ms for periodic updates
499+ // Limit select to 50ms for periodic checks
505500 if (timeout_val.tv_sec > 0 || timeout_val.tv_usec > 50000 ) {
506501 timeout_val.tv_sec = 0 ;
507502 timeout_val.tv_usec = 50000 ;
@@ -510,14 +505,6 @@ class Validator {
510505 select (result->get_max_fd () + 1 , result->get_read_fd_set (),
511506 result->get_write_fd_set (), result->get_exc_fd_set (),
512507 &timeout_val);
513-
514- // Update elapsed time periodically
515- if (stats_ptr) {
516- auto current_time = std::chrono::steady_clock::now ();
517- auto duration = std::chrono::duration_cast<std::chrono::duration<double >>(
518- current_time - start_time);
519- stats_ptr->total_time_s = duration.count ();
520- }
521508
522509 if (time (NULL ) >= expiry_time) {
523510 throw CurlException (" Timeout when loading the OIDC metadata." );
0 commit comments