////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// private void Store(FPSMemRecord record) { CreateWebClient().UploadValuesAsync( new Uri(WebStoreAddress), "POST", CreateParams(record), Guid.NewGuid().ToString()); }
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)); }
private void InitCache() { _records = new FPSMemRecord[CacheSize]; for (int i = 0; i < _records.Length; i++) { _records[i] = new FPSMemRecord(); } _currentCachePosition = 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); }
public void Collect(FPSMemRecord record) { Fill(record); }
protected abstract void Fill(FPSMemRecord record);
protected override void Fill(FPSMemRecord record) { record.Add("timestamp", System.DateTime.Now); record.Add("fps", _memChecker.FPS); record.Add("mem", _memChecker.Memory); }
protected override void Fill(FPSMemRecord record) { record.Add("scene", Application.loadedLevelName); }
protected override void Fill(FPSMemRecord record) { record.Add("platform", Application.platform); }