public DomainStatisticsSummary deepCopy() { return new DomainStatisticsSummary(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DomainStatisticsSummary) return this.equals((DomainStatisticsSummary)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case ID: return Integer.valueOf(get_id()); case THROUGHPUT_TOTAL: return Double.valueOf(get_throughput_total()); case RESPONSE_DATA_THROUGHPUT_TOTAL: return Double.valueOf(get_response_data_throughput_total()); case NUM_REQUESTS_TOTAL: return Long.valueOf(get_num_requests_total()); case NUM_HITS_TOTAL: return Long.valueOf(get_num_hits_total()); case NUM_L1_CACHE_HITS_TOTAL: return Long.valueOf(get_num_l1_cache_hits_total()); case NUM_L2_CACHE_HITS_TOTAL: return Long.valueOf(get_num_l2_cache_hits_total()); case CACHE_NUM_ITEMS: return Long.valueOf(get_cache_num_items()); case CACHE_MAX_NUM_ITEMS: return Long.valueOf(get_cache_max_num_items()); case CACHE_NUM_MANAGED_BYTES: return Long.valueOf(get_cache_num_managed_bytes()); case CACHE_MAX_NUM_MANAGED_BYTES: return Long.valueOf(get_cache_max_num_managed_bytes()); case LATENCY_SUMMARY: return get_latency_summary(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, RuntimeStatisticsSummary struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TMap _map92 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.domain_statistics = new HashMap<String,DomainStatisticsSummary>(2*_map92.size); for (int _i93 = 0; _i93 < _map92.size; ++_i93) { String _key94; // required DomainStatisticsSummary _val95; // optional _key94 = iprot.readString(); _val95 = new DomainStatisticsSummary(); _val95.read(iprot); struct.domain_statistics.put(_key94, _val95); } } struct.set_domain_statistics_isSet(true); } }
_val89 = new DomainStatisticsSummary(); _val89.read(iprot); struct.domain_statistics.put(_key88, _val89);
/** * Performs a deep copy on <i>other</i>. */ public RuntimeStatisticsSummary(RuntimeStatisticsSummary other) { if (other.is_set_domain_statistics()) { Map<String,DomainStatisticsSummary> __this__domain_statistics = new HashMap<String,DomainStatisticsSummary>(); for (Map.Entry<String, DomainStatisticsSummary> other_element : other.domain_statistics.entrySet()) { String other_element_key = other_element.getKey(); DomainStatisticsSummary other_element_value = other_element.getValue(); String __this__domain_statistics_copy_key = other_element_key; DomainStatisticsSummary __this__domain_statistics_copy_value = new DomainStatisticsSummary(other_element_value); __this__domain_statistics.put(__this__domain_statistics_copy_key, __this__domain_statistics_copy_value); } this.domain_statistics = __this__domain_statistics; } }
public static void setRuntimeStatistics(Host host, Map<Domain, RuntimeStatisticsAggregator> runtimeStatisticsAggregators) throws IOException { RuntimeStatisticsSummary summary = new RuntimeStatisticsSummary(); StringBuilder statistics = new StringBuilder(); for (Map.Entry<Domain, RuntimeStatisticsAggregator> entry : runtimeStatisticsAggregators.entrySet()) { Domain domain = entry.getKey(); RuntimeStatisticsAggregator runtimeStatisticsAggregator = entry.getValue(); DomainStatisticsSummary domainSummary = new DomainStatisticsSummary(); runtimeStatisticsAggregator.putToStatistics(domainSummary); summary.put_to_domain_statistics(domain.getName(), domainSummary); statistics.append(domain.getId()); statistics.append('\t'); statistics.append(RuntimeStatisticsAggregator.toString(runtimeStatisticsAggregator)); statistics.append('\n'); } host.setEphemeralStatistic(RUNTIME_STATISTICS_KEY, statistics.toString()); host.setRuntimeStatisticsSummary(summary); }