コード例 #1
0
ファイル: WebStatsModule.cs プロジェクト: p07r0457/opensim
 private static UserSessionData ZeroSession(UserSessionData s)
 {
     s.session_id          = UUID.Zero;
     s.agent_id            = UUID.Zero;
     s.region_id           = UUID.Zero;
     s.last_updated        = Util.UnixTimeSinceEpoch();
     s.remote_ip           = "";
     s.name_f              = "";
     s.name_l              = "";
     s.avg_agents_in_view  = 0;
     s.min_agents_in_view  = 0;
     s.max_agents_in_view  = 0;
     s.mode_agents_in_view = 0;
     s.avg_fps             = 0;
     s.min_fps             = 0;
     s.max_fps             = 0;
     s.mode_fps            = 0;
     s.a_language          = "";
     s.mem_use             = 0;
     s.meters_traveled     = 0;
     s.avg_ping            = 0;
     s.min_ping            = 0;
     s.max_ping            = 0;
     s.mode_ping           = 0;
     s.regions_visited     = 0;
     s.run_time            = 0;
     s.avg_sim_fps         = 0;
     s.min_sim_fps         = 0;
     s.max_sim_fps         = 0;
     s.mode_sim_fps        = 0;
     s.start_time          = 0;
     s.client_version      = "";
     s.s_cpu            = "";
     s.s_gpu            = "";
     s.s_os             = "";
     s.s_ram            = 0;
     s.d_object_kb      = 0;
     s.d_texture_kb     = 0;
     s.d_world_kb       = 0;
     s.n_in_kb          = 0;
     s.n_in_pk          = 0;
     s.n_out_kb         = 0;
     s.n_out_pk         = 0;
     s.f_dropped        = 0;
     s.f_failed_resends = 0;
     s.f_invalid        = 0;
     s.f_off_circuit    = 0;
     s.f_resent         = 0;
     s.f_send_packet    = 0;
     s._ping            = new List <float>();
     s._fps             = new List <float>();
     s._sim_fps         = new List <float>();
     s._agents_in_view  = new List <int>();
     return(s);
 }
コード例 #2
0
ファイル: WebStatsModule.cs プロジェクト: p07r0457/opensim
        public static void UpdateMultiItems(ref UserSessionData s, int agents_in_view, float ping, float sim_fps, float fps)
        {
            // don't insert zero values here or it'll skew the statistics.
            if (agents_in_view == 0 && fps == 0 && sim_fps == 0 && ping == 0)
            {
                return;
            }
            s._agents_in_view.Add(agents_in_view);
            s._fps.Add(fps);
            s._sim_fps.Add(sim_fps);
            s._ping.Add(ping);

            int[] __agents_in_view = s._agents_in_view.ToArray();

            s.avg_agents_in_view  = ArrayAvg_i(__agents_in_view);
            s.min_agents_in_view  = ArrayMin_i(__agents_in_view);
            s.max_agents_in_view  = ArrayMax_i(__agents_in_view);
            s.mode_agents_in_view = ArrayMode_i(__agents_in_view);

            float[] __fps = s._fps.ToArray();
            s.avg_fps  = ArrayAvg_f(__fps);
            s.min_fps  = ArrayMin_f(__fps);
            s.max_fps  = ArrayMax_f(__fps);
            s.mode_fps = ArrayMode_f(__fps);

            float[] __sim_fps = s._sim_fps.ToArray();
            s.avg_sim_fps  = ArrayAvg_f(__sim_fps);
            s.min_sim_fps  = ArrayMin_f(__sim_fps);
            s.max_sim_fps  = ArrayMax_f(__sim_fps);
            s.mode_sim_fps = ArrayMode_f(__sim_fps);

            float[] __ping = s._ping.ToArray();
            s.avg_ping  = ArrayAvg_f(__ping);
            s.min_ping  = ArrayMin_f(__ping);
            s.max_ping  = ArrayMax_f(__ping);
            s.mode_ping = ArrayMode_f(__ping);
        }
コード例 #3
0
 private static UserSessionData ZeroSession(UserSessionData s)
 {
     s.session_id = UUID.Zero;
     s.agent_id = UUID.Zero;
     s.region_id = UUID.Zero;
     s.last_updated = Util.UnixTimeSinceEpoch();
     s.remote_ip = "";
     s.name_f = "";
     s.name_l = "";
     s.avg_agents_in_view = 0;
     s.min_agents_in_view = 0;
     s.max_agents_in_view = 0;
     s.mode_agents_in_view = 0;
     s.avg_fps = 0;
     s.min_fps = 0;
     s.max_fps = 0;
     s.mode_fps = 0;
     s.a_language = "";
     s.mem_use = 0;
     s.meters_traveled = 0;
     s.avg_ping = 0;
     s.min_ping = 0;
     s.max_ping = 0;
     s.mode_ping = 0;
     s.regions_visited = 0;
     s.run_time = 0;
     s.avg_sim_fps = 0;
     s.min_sim_fps = 0;
     s.max_sim_fps = 0;
     s.mode_sim_fps = 0;
     s.start_time = 0;
     s.client_version = "";
     s.s_cpu = "";
     s.s_gpu = "";
     s.s_os = "";
     s.s_ram = 0;
     s.d_object_kb = 0;
     s.d_texture_kb = 0;
     s.d_world_kb = 0;
     s.n_in_kb = 0;
     s.n_in_pk = 0;
     s.n_out_kb = 0;
     s.n_out_pk = 0;
     s.f_dropped = 0;
     s.f_failed_resends = 0;
     s.f_invalid = 0;
     s.f_off_circuit = 0;
     s.f_resent = 0;
     s.f_send_packet = 0;
     s._ping = new List<float>();
     s._fps = new List<float>();
     s._sim_fps = new List<float>();
     s._agents_in_view = new List<int>();
     return s;
 }
コード例 #4
0
        public static void UpdateMultiItems(ref UserSessionData s, int agents_in_view, float ping, float sim_fps, float fps)
        {
            // don't insert zero values here or it'll skew the statistics.
            if (agents_in_view == 0 && fps == 0 && sim_fps == 0 && ping == 0)
                return;
            s._agents_in_view.Add(agents_in_view);
            s._fps.Add(fps);
            s._sim_fps.Add(sim_fps);
            s._ping.Add(ping);

            int[] __agents_in_view = s._agents_in_view.ToArray();

            s.avg_agents_in_view = ArrayAvg_i(__agents_in_view);
            s.min_agents_in_view = ArrayMin_i(__agents_in_view);
            s.max_agents_in_view = ArrayMax_i(__agents_in_view);
            s.mode_agents_in_view = ArrayMode_i(__agents_in_view);

            float[] __fps = s._fps.ToArray();
            s.avg_fps = ArrayAvg_f(__fps);
            s.min_fps = ArrayMin_f(__fps);
            s.max_fps = ArrayMax_f(__fps);
            s.mode_fps = ArrayMode_f(__fps);

            float[] __sim_fps = s._sim_fps.ToArray();
            s.avg_sim_fps = ArrayAvg_f(__sim_fps);
            s.min_sim_fps = ArrayMin_f(__sim_fps);
            s.max_sim_fps = ArrayMax_f(__sim_fps);
            s.mode_sim_fps = ArrayMode_f(__sim_fps);

            float[] __ping = s._ping.ToArray();
            s.avg_ping = ArrayAvg_f(__ping);
            s.min_ping = ArrayMin_f(__ping);
            s.max_ping = ArrayMax_f(__ping);
            s.mode_ping = ArrayMode_f(__ping);
        }
コード例 #5
0
ファイル: WebStatsModule.cs プロジェクト: p07r0457/opensim
        public static UserSessionData newUserSessionData()
        {
            UserSessionData obj = ZeroSession(new UserSessionData());

            return(obj);
        }