FPS graph
This will show you the graph of your FPS as a moving pattern to show if you had any FPS dips, and just to visualize your framerate over time like what POE does.
|
|
| Quick Facts |
|---|
This will show you the graph of your FPS as a moving pattern to show if you had any FPS dips, and just to visualize your framerate over time like what POE does.
Contains custom functions.
Code has been reviewed and is safe to use, custom functions might affect in-game performance.
{
"m": "d",
"d": {
"displayText_format_c13_decimal_precision": 1,
"authorOptions": [
{
"type": "range",
"useDesc": true,
"max": 1,
"step": 0.05,
"width": 1,
"min": 0.05,
"name": "Refresh speed",
"default": 0.2,
"key": "refreshRate",
"desc": "Changes how fast the FPS graph will update"
},
{
"type": "range",
"useDesc": true,
"max": 100,
"step": 5,
"width": 1,
"min": 10,
"name": "Length of graph",
"default": 30,
"key": "refreshDuration",
"desc": "Increases the number of dots displayed"
}
],
"displayText_format_p_time_dynamic_threshold": 60,
"displayText_format_c4_format": "none",
"yOffset": -27.849,
"anchorPoint": "CENTER",
"displayText_format_p_time_format": 0,
"url": "https:\/\/db.ascension.gg\/?weakaura=358",
"actions": {
"start": [],
"init": [],
"finish": []
},
"displayText_format_c8_format": "none",
"displayText_format_c1_format": "none",
"displayText_format_c15_format": "none",
"displayText_format_c5_format": "none",
"desc": "Made by Szyler",
"font": "Friz Quadrata TT",
"displayText_format_l4_format": "none",
"load": {
"use_never": false,
"talent": {
"multi": []
},
"class": {
"multi": []
},
"spec": {
"multi": []
},
"size": {
"multi": []
}
},
"displayText_format_c9_format": "none",
"shadowXOffset": 1,
"regionType": "text",
"displayText_format_l1_format": "none",
"tocversion": 30300,
"displayText_format_c13_abbreviate_max": 8,
"config": {
"refreshRate": 0.05,
"refreshDuration": 100
},
"fixedWidth": 200,
"outline": "OUTLINE",
"color": [
1,
1,
1,
1
],
"customText": "function()\n -- Store history for FPS\n aura_env.fpsHistory = aura_env.fpsHistory or {}\n \n -- Get current FPS\n local fps = GetFramerate()\n local roundedFPS = tonumber(string.format(\"%.0f\", fps))\n \n -- Update history for FPS\n table.insert(aura_env.fpsHistory, 1, roundedFPS)\n \n while #aura_env.fpsHistory > aura_env.config.refreshDuration do\n table.remove(aura_env.fpsHistory)\n end\n \n \n -- Calculate average FPS\n local avgFPS = 0\n for _, value in ipairs(aura_env.fpsHistory) do\n avgFPS = avgFPS + value\n end\n avgFPS = avgFPS \/ #aura_env.fpsHistory\n \n -- Build and return the display rows for FPS graph\n local fpsRow1, fpsRow2, fpsRow3, fpsRow4, fpsRow5, fpsRow6, fpsRow7, fpsRow8, fpsRow9, fpsRow10 = \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"\n \n \n -- Calculate the maximum and minimum FPS values recorded\n local maxFPS = #aura_env.fpsHistory > 0 and math.max(unpack(aura_env.fpsHistory)) or 0\n local minFPS = #aura_env.fpsHistory > 0 and math.min(unpack(aura_env.fpsHistory)) or 0\n \n for _, value in ipairs(aura_env.fpsHistory) do\n local firstRowFilled = false -- Flag to check if the first row has been filled\n \n for i = 1, 10 do\n local row = \"\"\n \n -- Adjust the threshold based on the maximum FPS value recorded and the minimum FPS value recorded\n local threshold = math.min(maxFPS) - (i - 1) * math.min(maxFPS\/10,(maxFPS-minFPS)\/8)\n \n if value >= threshold then\n if not firstRowFilled then\n row = row .. \".\"\n firstRowFilled = true -- Set the flag to true once the first row is filled\n else\n row = row .. \" \" -- Blank out the row if the first row is already filled\n end\n else\n row = row .. \" \"\n end\n \n if i == 1 then fpsRow1 = fpsRow1 .. row end\n if i == 2 then fpsRow2 = fpsRow2 .. row end\n if i == 3 then fpsRow3 = fpsRow3 .. row end\n if i == 4 then fpsRow4 = fpsRow4 .. row end\n if i == 5 then fpsRow5 = fpsRow5 .. row end\n if i == 6 then fpsRow6 = fpsRow6 .. row end\n if i == 7 then fpsRow7 = fpsRow7 .. row end\n if i == 8 then fpsRow8 = fpsRow8 .. row end\n if i == 9 then fpsRow9 = fpsRow9 .. row end\n if i == 10 then fpsRow10 = fpsRow10 .. row end\n \n end\n end\n \n -- Build and return the display text with FPS graph\n local fpsText = \"Avg FPS \" .. string.format(\"%.2f\", avgFPS) -- Average FPS text\n \n return fpsRow1, fpsRow2, fpsRow3, fpsRow4, fpsRow5, fpsRow6, fpsRow7, fpsRow8, fpsRow9, fpsRow10, fpsText, roundedFPS, maxFPS, minFPS\nend",
"displayText_format_c7_format": "none",
"displayText_format_l3_format": "none",
"customTextUpdate": "event",
"automaticWidth": "Auto",
"triggers": {
"1": {
"trigger": {
"type": "custom",
"custom_hide": "timed",
"subeventSuffix": "_CAST_START",
"customVariables": "\n\n",
"duration": "5",
"event": "Health",
"subeventPrefix": "SPELL",
"events": "COMBAT_LOG_EVENT_UNFILTERED",
"custom": "function()\n if not aura_env.lastTriggerTime then\n -- First time triggering, set the timestamp and return true\n aura_env.lastTriggerTime = GetTime()\n return true\n else\n local currentTime = GetTime()\n local elapsedTime = currentTime - aura_env.lastTriggerTime\n \n -- Check if at least 0.5 seconds have passed since the last trigger\n if elapsedTime >= aura_env.config.refreshRate then\n -- Update the timestamp and return true\n aura_env.lastTriggerTime = currentTime\n return true\n else\n -- Less than 0.5 seconds have passed, don't trigger again\n return false\n end\n end\nend",
"spellIds": [],
"custom_type": "event",
"check": "event",
"names": [],
"unit": "player",
"debuffType": "HELPFUL"
},
"untrigger": []
},
"disjunctive": "all",
"activeTriggerMode": -10
},
"displayText_format_p_format": "timed",
"internalVersion": 52,
"displayText_format_c13_format": "none",
"animation": {
"start": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
},
"main": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
},
"finish": {
"type": "none",
"easeStrength": 3,
"duration_type": "seconds",
"easeType": "none"
}
},
"displayText_format_c2_format": "none",
"displayText_format_c_format": "none",
"displayText_format_c12_format": "none",
"displayText_format_c13_abbreviate": false,
"displayText_format_s_format": "none",
"fontSize": 12,
"uid": "3wX467qFRBX",
"subRegions": [
{
"type": "subbackground"
}
],
"displayText": "--- FPS: %c12\n%c1\n%c2\n%c3\n%c4\n%c5\n%c6\n%c7\n%c8\n%c9\n%c10\nMin: %c14, Max: %c13\n%c11\n ",
"shadowYOffset": -1,
"shadowColor": [
0,
0,
0,
1
],
"displayText_format_p_time_precision": 1,
"anchorFrameType": "SCREEN",
"displayText_format_c14_format": "none",
"selfPoint": "BOTTOM",
"justify": "LEFT",
"frameStrata": 1,
"id": "FPS graph",
"displayText_format_c11_format": "none",
"displayText_format_l5_format": "none",
"displayText_format_f1_format": "none",
"displayText_format_c10_format": "none",
"displayText_format_l2_format": "none",
"displayText_format_c3_format": "none",
"xOffset": -601.9,
"displayText_format_c6_format": "none",
"conditions": [],
"information": [],
"wordWrap": "WordWrap"
},
"s": "4.2.1",
"v": 1421
}