Пример #1
0
    //////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////

    private void Store(FPSMemRecord record)
    {
        CreateWebClient().UploadValuesAsync(
            new Uri(WebStoreAddress),
            "POST",
            CreateParams(record),
            Guid.NewGuid().ToString());
    }
Пример #2
0
    private void Log(FPSMemRecord record)
    {
        string logString = "";

        foreach (var pair in record.Data())
        {
            logString += pair.Key + ": " + pair.Value.ToString() + ", ";
        }
        Debug.Log(logString.Substring(0, logString.Length - 2));
    }
Пример #3
0
    private void InitCache()
    {
        _records = new FPSMemRecord[CacheSize];
        for (int i = 0; i < _records.Length; i++)
        {
            _records[i] = new FPSMemRecord();
        }

        _currentCachePosition = 0;
    }
Пример #4
0
    private NameValueCollection CreateParams(FPSMemRecord record)
    {
        var keyVal = new NameValueCollection();

        foreach (var pair in record.Data())
        {
            keyVal.Add(pair.Key, pair.Value.ToString());
        }

        return(keyVal);
    }
Пример #5
0
 public void Collect(FPSMemRecord record)
 {
     Fill(record);
 }
Пример #6
0
 protected abstract void Fill(FPSMemRecord record);
Пример #7
0
 protected override void Fill(FPSMemRecord record)
 {
     record.Add("timestamp", System.DateTime.Now);
     record.Add("fps", _memChecker.FPS);
     record.Add("mem", _memChecker.Memory);
 }
Пример #8
0
 protected override void Fill(FPSMemRecord record)
 {
     record.Add("scene", Application.loadedLevelName);
 }
Пример #9
0
 protected override void Fill(FPSMemRecord record)
 {
     record.Add("platform", Application.platform);
 }