Skip to content

Instantly share code, notes, and snippets.

View MrsTonedOne's full-sized avatar
🎯
Focusing

Kassandra Riley Spier-Swenson MrsTonedOne

🎯
Focusing
View GitHub Profile
[2018-07-08 02:41:56.058] ### VarEdit by MrStonedOne/(MrStonedOne): /datum/controller/subsystem/timer last_invoke_tick=13689.5 => 1
[2018-07-08 02:41:56.070] ## WARNING: No regular timers processed in the last 600 ticks, resetting buckets! in code/controllers/subsystem/timer.dm at line 51 src: Timer usr: .
[2018-07-08 02:41:56.071] Timer bucket reset. world.time: 13698.5, head_offset: 12600, practical_offset: 1017
[2018-07-08 02:41:56.073] Active timers at index 24:
[2018-07-08 02:41:56.075] Timer: Timer: 22702 ([0x210c120b]), TTR: 13211.5, Flags: TIMER_STOPPABLE, callBack: [0x2111a14f], callBack.object: some_magic_bullshit[0x600037f](GLOBAL_PROC), callBack.delegate:/proc/qdel(the green laser)Prev: NULL, Next: NULL
[2018-07-08 02:41:56.077] Active timers at index 60:
[2018-07-08 02:41:56.077] Timer: Timer: 22733 ([0x21138387]), TTR: 13229.5, Flags: TIMER_STOPPABLE, callBack: [0x2112fd6f], callBack.object: some_magic_bullshit[0x600037f](GLOBAL_PROC), callBack.delegate:/proc/qdel(the green laser)Prev: Timer: 22
//the final number in a line is the usage, the previous numbers are the after and before total memory usage
mem:_maps/map_files/MetaStation/MetaStation.dmm(mapload):229.46MB-227.61MB=1.85MB
mem:_maps/map_files/MetaStation/MetaStation.dmm(mapload):255.37MB-230.09MB=25.29MB
mem:_maps/map_files/Mining/Lavaland.dmm(mapload):255.38MB-256.96MB=-1.65478e+006B
mem:_maps/map_files/Mining/Lavaland.dmm(mapload):290.12MB-255.87MB=34.25MB
mem:_maps/map_files/generic/City_of_Cogs.dmm(mapload):293.19MB-291.14MB=2.05MB
mem:_maps/RandomRuins/SpaceRuins/spacehotel.dmm(mapload):301.45MB-299.93MB=1.52MB
mem:/turf/closed/mineral(new()):27.61MB
mem:/turf/closed/mineral/random(new()):27.61MB
/world/turf = /turf/open/space/basic
/turf
icon = 'space.dmi'
icon_state = "0"
name = "\proper space"
var/intact = 0
plane = -95
layer = 8.5
var bv1 = 91.21312
var bv12 = 91.21323

server mem usage:

Prototypes:

  • obj: 2156 (20)
  • mob: 2172 (1)
  • proc: 7452 (53)
  • str: 16496 (586)
  • appearance: 17576 (5)
  • id array: 10580 (117)
  • map: 8248 (255,255,0)
@MrsTonedOne
MrsTonedOne / 0-runtime-LOWMEMORYMODE-z1-only.mem.txt
Created June 3, 2018 09:55
Memory usage. Only non-zero entries.
mem:Research(init):218877952-218513408=364544
mem:Events(init):219054080-218877952=176128
mem:Ticker(init):219185152-219054080=131072
mem:_maps/map_files/debug/runtimestation.dmm(mapload):219267072-219185152=81920
mem:_maps/map_files/debug/runtimestation.dmm(mapload):232235008-230727680=1507328
mem:_maps/RandomRuins/SpaceRuins/derelict6.dmm(mapload):233132032-233123840=8192
mem:_maps/shuttles/emergency_arena.dmm(mapload):233136128-233132032=4096
mem:/turf/closed/wall/r_wall(new()):208896
mem:/obj/machinery/light(new()):65536
mem:/obj/machinery/airalarm/unlocked(new()):65536
CREATE TABLE `tgstation13`.`ss13role_time_log` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `ckey` VARCHAR(32) NOT NULL , `job` VARCHAR(128) NOT NULL , `delta` INT NOT NULL , `datetime` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`), INDEX (`ckey`), INDEX (`job`), INDEX (`datetime`)) ENGINE = InnoDB;
DELIMITER
$$
CREATE TRIGGER `tgstation13`.`ss13role_timeTlogupdate`
AFTER UPDATE
ON `tgstation13`.`ss13role_time` FOR EACH ROW
BEGIN
INSERT into ss13role_time_log (ckey, job, delta) VALUES (NEW.CKEY, NEW.job, NEW.minutes-OLD.minutes);
END
@MrsTonedOne
MrsTonedOne / byondmemory.dm
Created February 7, 2018 22:29
byond memory usage of lists vs datums
//run verb, give it its memory usage as it asks, be sure to wait 5 seconds from when it asks to when you enter the data. use process explorer for best results. Use dd -> ds, not direct ds run, re-launch dd between tests
#define SAMPLE_SIZE 1000000
/client/verb/memorytest()
var/startingmemory = input("memory usage (kb)") as num
var/list/lists = new (SAMPLE_SIZE)
var/listemptymemory = input("memory usage (kb)") as num
for (var/i in 1 to lists.len)
lists[i] = list()
var/listfullmemory = input("memory usage (kb)") as num
debug=status
Connections: Telnet @127.000.000.001
Run Time: 17.92s
debug=profile
CPU Profile Report for 512testing
[stop][refresh][clear]
Status: profiling: [Total] [Average]
Proc Self CPU Time Total CPU Time Real Time Calls
@MrsTonedOne
MrsTonedOne / Sorted.txt
Created December 16, 2017 09:37
compile time by proc.
This file has been truncated, but you can view the full file.
22.1503s loading tgstation.dme
0.2957s code\modules\admin\topic.dm:16:error: src.procstart: undefined var
0.1507s code\modules\research\designs.dm:56:error: procstart: undefined var
0.1419s code\__DATASTRUCTURES\stacks.dm:73:error: src.procstart: undefined var
0.1332s code\__DATASTRUCTURES\priority_queue.dm:94:error: src.procstart: undefined var
0.1256s code\datums\mind.dm:795:error: src.procstart: undefined var
0.0900s code\modules\admin\player_panel.dm:314:error: src.procstart: undefined var
0.0884s code\modules\research\designs.dm:57:error: src.procstart: undefined var
0.0834s code\modules\admin\secrets.dm:94:error: src.procstart: undefined var
0.0761s code\game\machinery\computer\medical.dm:203:error: src.procstart: undefined var