MCPcopy Create free account
hub / github.com/ceph/ceph / hit_session

Method hit_session

src/mds/SessionMap.cc:1157–1172  ·  view source on GitHub ↗

track total and per session load

Source from the content-addressed store, hash-verified

1155
1156// track total and per session load
1157void SessionMap::hit_session(Session *session) {
1158 uint64_t sessions = get_session_count_in_state(Session::STATE_OPENING) +
1159 get_session_count_in_state(Session::STATE_OPEN) +
1160 get_session_count_in_state(Session::STATE_STALE) +
1161 get_session_count_in_state(Session::STATE_CLOSING) +
1162 get_session_count_in_state(Session::STATE_KILLING);
1163 ceph_assert(sessions != 0);
1164
1165 double total_load = total_load_avg.hit();
1166 double avg_load = total_load / sessions;
1167
1168 logger->set(l_mdssm_total_load, (uint64_t)total_load);
1169 logger->set(l_mdssm_avg_load, (uint64_t)avg_load);
1170
1171 session->hit_session();
1172}
1173
1174void SessionMap::handle_conf_change(const std::set<std::string>& changed)
1175{

Callers 2

early_replyMethod · 0.45
reply_client_requestMethod · 0.45

Calls 2

hitMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected