Class: Qa::LinkedData::PerformanceDataService
- Inherits:
-
Object
- Object
- Qa::LinkedData::PerformanceDataService
- Defined in:
- app/services/qa/linked_data/performance_data_service.rb
Class Method Summary collapse
-
.performance_data(access_time_s:, normalize_time_s:, fetched_data_graph:, normalized_data:) ⇒ Object
Construct performance data structure to include in the returned results (linked data module).
Class Method Details
.performance_data(access_time_s:, normalize_time_s:, fetched_data_graph:, normalized_data:) ⇒ Object
Construct performance data structure to include in the returned results (linked data module).
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/services/qa/linked_data/performance_data_service.rb', line 13 def self.performance_data(access_time_s:, normalize_time_s:, fetched_data_graph:, normalized_data:) normalized_size = normalized_data.to_s.size fetched_size = fetched_data_graph.triples.to_s.size { fetch_time_s: access_time_s, normalization_time_s: normalize_time_s, fetched_bytes: fetched_size, normalized_bytes: normalized_size, fetch_bytes_per_s: fetched_size / access_time_s, normalization_bytes_per_s: normalized_size / normalize_time_s, total_time_s: (access_time_s + normalize_time_s) } end |