removed atom del profiler (#27144)

This commit is contained in:
DamianX
2020-07-20 11:23:59 +02:00
committed by GitHub
parent c455e825ca
commit 87bd23c55f
10 changed files with 1 additions and 42 deletions

View File

@@ -45,9 +45,6 @@ var/global/list/deadmins = list()
//List of vars that require DEBUG on top of VAREDIT to be able to edit
var/list/lockedvars = list("vars", "client", "holder", "step_x", "step_y", "step_size")
// List of types and how many instances of each type there are.
var/list/type_instances = list()
/var/global/datum/map/active/map = new() //Current loaded map
//Defined in its .dm, see maps/_map.dm for more info.

View File

@@ -141,22 +141,6 @@ var/global/list/ghdel_profiling = list()
var/mob/living/M = src
M.take_organ_damage(10)
/atom/proc/AddToProfiler()
// Memory usage profiling - N3X.
++type_instances[type]
/atom/proc/DeleteFromProfiler()
// Memory usage profiling - N3X.
if (type in type_instances)
type_instances[type] = type_instances[type] - 1
else
type_instances[type] = 0
WARNING("Type [type] does not inherit /atom/New(). Please ensure ..() is called, or that the type calls AddToProfiler().")
/atom/Del()
DeleteFromProfiler()
..()
/atom/Destroy()
if(reagents)
qdel(reagents)
@@ -184,7 +168,6 @@ var/global/list/ghdel_profiling = list()
/atom/New()
on_density_change = new("owner"=src)
. = ..()
AddToProfiler()
/atom/proc/assume_air(datum/gas_mixture/giver)
return null

View File

@@ -570,7 +570,6 @@
return 0
/obj/item/weapon/holo/esword/New()
AddToProfiler()
_color = pick("red","blue","green","purple")
/obj/item/weapon/holo/esword/attack_self(mob/living/user as mob)

View File

@@ -763,7 +763,6 @@ steam.start() -- spawns the effect
flick("[icon_state]-disolve", src)
sleep(5)
qdel(src)
AddToProfiler()
/obj/effect/effect/foam/fire/process()
if(--amount < 0)

View File

@@ -177,7 +177,6 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/cmd_admin_dump_instances, // /vg/
/client/proc/cmd_admin_dump_machine_type_list, // /vg/
/client/proc/disable_bloodvirii, // /vg
/client/proc/handle_paperwork, //this is completely experimental

View File

@@ -711,20 +711,6 @@ Pressure: [env.pressure]"}
else
alert("Invalid mob")
/client/proc/cmd_admin_dump_instances()
set category = "Debug"
set name = "Dump Instance Counts"
set desc = "MEMORY PROFILING IS TOO HIGH TECH"
var/date_string = time2text(world.realtime, "YYYY-MM-DD")
var/F=file("data/logs/profiling/[date_string]_instances.csv")
fdel(F)
F << "Types,Number of Instances"
for(var/key in type_instances)
F << "[key],[type_instances[key]]"
to_chat(usr, "<span class='notice'>Dumped to [F]</span>")
/client/proc/cmd_admin_find_bad_blood_tracks()
set category = "Debug"
set name = "Find broken blood tracks"

View File

@@ -39,7 +39,6 @@
var/toxin_dmg = 0
/obj/effect/landmark/corpse/New()
AddToProfiler()
if(ticker)
initialize()

View File

@@ -24,7 +24,6 @@ var/list/stationary_hearers = list( /obj/item/device/radio/intercom,
ignoreinvert = 1
/mob/virtualhearer/New(atom/attachedto)
AddToProfiler()
virtualhearers += src
loc = get_turf(attachedto)
attached = attachedto

View File

@@ -79,7 +79,6 @@
/obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R)
..()
add_languages(R)
AddToProfiler()
if(default_modules)
AddDefaultModules()
UpdateModuleHolder(R)
@@ -635,7 +634,7 @@
sensor_augs = list("Medical", "Disable")
fix_modules()
/obj/item/weapon/robot_module/starman
name = "starman robot module"
module_holder = "starman"

View File

@@ -1036,7 +1036,6 @@
/obj/item/weapon/archaeological_find/New(loc, var/new_item_type)
..()
AddToProfiler()
if(new_item_type)
find_type = new_item_type
else