@@ -275,20 +275,21 @@ TEST_F(
275275 << " Read counter did not increase after workload" ;
276276 EXPECT_GE (bandwidth_after.writeCounter , bandwidth_before.writeCounter )
277277 << " Write counter did not increase after workload" ;
278- EXPECT_GE (bandwidth_after.maxBandwidth , bandwidth_before.maxBandwidth )
279- << " Max bandwidth did not increase after workload" ;
280-
281- auto percentage_bandwidth =
282- 1000000 *
278+ EXPECT_GE (bandwidth_after.timestamp , bandwidth_before.timestamp )
279+ << " Timestamp did not increase after workload" ;
280+ double percentage_bandwidth =
281+ 1000000.0 *
283282 ((bandwidth_after.readCounter - bandwidth_before.readCounter ) +
284283 (bandwidth_after.writeCounter - bandwidth_before.writeCounter )) /
285- (bandwidth_after.maxBandwidth *
286- (bandwidth_after.timestamp - bandwidth_before.timestamp ));
284+ (static_cast <double >(bandwidth_after.maxBandwidth ) *
285+ (static_cast <double >(bandwidth_after.timestamp ) -
286+ static_cast <double >(bandwidth_before.timestamp )));
287287 // Validate that percentage bandwidth is greater than zero
288288 LOG_INFO << " Percentage Bandwidth: " << percentage_bandwidth << " %" ;
289289 EXPECT_GT (percentage_bandwidth, 0.0 )
290290 << " Percentage bandwidth is not greater than zero" ;
291- EXPECT_LT (percentage_bandwidth, 100.0 );
291+ EXPECT_LE (percentage_bandwidth, 100.0 )
292+ << " Percentage bandwidth is greater than 100%" ;
292293 }
293294 // Free device memory
294295 lzt::free_memory (src_ptr);
0 commit comments