Determining performance usage of each plugin installed?
Toliman
Hi,
is there a way to see how much "influence" each plugin has on the server.
Like calledhooks per second, functions per second, active time, etc?

Since i became admin on a server which already owns a bunch of plugins, i need to keep track how much impact they have.

For example, i am using the plugin "NpcTarget".
This plugin just uses 2 Hooks with only 3 lines each.
So it is a very little plugin:

private object OnNpcTarget(BaseNpc npc, BaseEntity entity)
        {			
            if (entity.IsNpc || entity is BaseNpc)
                return true;
            return null;
        }​


Basically it tries to avoid that NPCs attack each other.
But isn't that awful?
It feels like every tick the npcs tries to attack, but everytime the plugin tells him to stop.

As a beginner i cannot tell if this is a huge impact, or not even worth to mention.

That's why i need some kind of "RessourceMonitor" (like the windows taskmanager has) to learn.

misticos
Plugin Developer
Editor
AFAIK in "o.plugins" there is a number of total hooks time in seconds, so you can find out plugins that take more time than others to execute hooks, etc. Usually if there's an unusual and uncomfortable hook usage duration, oxide warns you in console.
Toliman
Original Poster
I can see use the console command "oxide.plugin". but it shows only the list of installed (loaded/unloaded) plugins and a number in brackets.
For example:
 01 "AdminLeaveJoin" (0.1.9) by austinv900 (0.20s) - AdminLeaveJoin.cs
  02 "AdminSleigh" (0.1.1) by k1lly0u (0.07s) - AdminSleigh.cs
  03 "AutoDoors" (3.1.2) by Wulf/lukespragg (2.01s) - AutoDoors.cs
  04 "Backpacks" (3.0.2) by LaserHydra (144.32s) - Backpacks.cs
  05 "Barrelless" (0.0.7) by Kechless (18.14s) - Barrelless.cs
  06 "Barrel Points" (2.0.8) by redBDGR (53.17s) - BarrelPoints.cs
  07 "BoxLooters" (0.3.5) by 4seti / k1lly0u (129.32s) - BoxLooters.cs
  08 "Build" (2.0.82) by Reneb & NoGrod (18.08s) - Build.cs
  09 "BuildingBlocker" (2.4.0) by Vlad-00003 (1.44s) - BuildingBlocker.cs
  10 "Building Owners" (3.0.2) by Reneb (15.03s) - BuildingOwners.cs
  11 "ColouredNames" (1.3.4) by collect_vood & PsychoTea (0.25s) - ColouredNames.cs
  12 "Copy Paste" (4.1.14) by Reneb & MiRror & Misstake (2.49s) - CopyPaste.cs
  13 "Player corpse duration modifier" (2.0.4) by Mughisi (46.24s) - CorpseDuration.cs
  14 "CountryBlock" (1.2.4) by Wulf/lukespragg (396.26s) - CountryBlock.cs
  15 "CustomDecay" (1.0.2) by Wizera (317.61s) - CustomDecay.cs
  16 "Dangerous Treasures" (1.3.0) by nivex (539.15s) - DangerousTreasures.cs
  17 "Loot Bouncer" (0.3.2) by Sorrow (2.90s) - LootBouncer.cs
  18 "EasyVote" (2.0.35) by Exel80 (49.06s) - EasyVote.cs
  19 "Enhanced Hammer" (1.3.4) by Fuji/Visa (8.20s) - EnhancedHammer.cs
  20 "Kill Feed" (1.17.0) by Tuntenfisch (1.59s) - KillFeed.cs
  21 "FancyDrop" (2.7.9) by FuJiCuRa (29.30s) - FancyDrop.cs
  22 "Friends" (2.2.5) by Nogrod (9.20s) - Friends.cs
  23 "Furnace Splitter" (2.1.7) by Skipcast (260.20s) - FurnaceSplitter.cs
  24 "GatherControl" (1.6.1) by CaseMan (5.53s) - GatherControl.cs
  25 "Gathering Manager" (2.2.61) by Mughisi (3.98s) - GatherManager.cs
  26 "HeliControl" (1.3.2) by Shady (2.68s) - HeliControl.cs
  27 "Quick Sort" (1.3.5) by Frenk92 (28.99s) - QuickSort.cs
  28 "HeliVote" (0.1.32) by k1lly0u (0.70s) - HeliVote.cs
  29 "Image Library" (2.0.46) by Absolut & K1lly0u (0.05s) - ImageLibrary.cs
  30 "HeliRefuel" (1.0.9) by redBDGR (4.55s) - HeliRefuel.cs
  31 "InfoPanel" (0.9.9) by Ghosst / Nogrod (443.13s) - InfoPanel.cs
  32 "Inventory Viewer" (3.0.3) by Mughisi (10.68s) - InventoryViewer.cs
  33 "Kits" (3.2.93) by Reneb (1.27s) - Kits.cs
  34 "Loading Messages" (1.0.5) by CosaNostra/VVoid (23.30s) - LoadingMessages.cs
  35 "LockOnRockets" (0.2.14) by k1lly0u (670.92s) - LockOnRockets.cs
  36 "Master Key" (0.7.4) by Tori1157 (339.61s) - MasterKey.cs
  37 "NeonSkins" (1.0.11) by Colon Blow (41.00s) - NeonSkins.cs
  38 "Night Lantern" (2.0.96) by k1lly0u (74.88s) - NightLantern.cs
  39 "NoobMessages" (1.1.0) by Kappasaurus (0.04s) - NoobMessages.cs
  40 "NoSash" (1.0.0) by Jake_Rich (0.01s) - NoSash.cs
  41 "Notifier" (3.1.3) by SkinN (1.74s) - Notifier.cs
  42 "NoWeaponDrop" (1.0.1) by Fujikura (0.01s) - NoWeaponDrop.cs
  43 "NPC Drop Gun" (1.6.0) by 2CHEVSKII (4.60s) - NPCDropGun.cs
  44 "NTeleportation" (1.0.60) by RFC1920 (47.16s) - NTeleportation.cs
  45 "PermissionsManager" (0.1.1) by Steenamaroo (3.15s) - PermissionsManager.cs
  46 "PlayerAdministration" (1.5.3) by ThibmoRozier (0.95s) - PlayerAdministration.cs
  47 "PlayerDatabase" (1.5.7) by Reneb (0.17s) - PlayerDatabase.cs
  48 "PlayerInformations" (1.2.11) by austinv900 (0.14s) - PlayerInformations.cs
  49 "PlayerRanks" (1.4.4) by Steenamaroo (35.99s) - PlayerRanks.cs
  50 "PreventLooting" (1.9.3) by CaseMan (32.97s) - PreventLooting.cs
  51 "PrivateMessage" (2.0.2) by Nogrod (0.63s) - PrivateMessage.cs
  52 "Quarry Locks" (1.0.3) by Orange (0.18s) - QuarryLocks.cs
  53 "Quests" (2.2.7) by k1lly0u (56.45s) - Quests.cs
  54 "Quick Smelt" (5.1.2) by Iv Misticos (4.38s) - QuickSmelt.cs
  55 "RadtownAnimals" (0.2.82) by k1lly0u (0.85s) - RadtownAnimals.cs
  56 "Recycle Blueprints" (1.0.5) by Zugzwang (0.24s) - RecycleBlueprints.cs
  57 "RecycleManager" (1.0.15) by redBDGR (2.31s) - RecycleManager.cs
  58 "RemoverTool" (4.2.10) by Reneb/Fuji (0.91s) - RemoverTool.cs
  59 "Rust Rewards" (2.2.18) by MSpeedie (94.68s) - RustRewards.cs
  60 "ServerInfo" (0.5.3) by Fujikura/baton (3.10s) - ServerInfo.cs
  61 "ServerRewards" (0.4.67) by k1lly0u (0.18s) - ServerRewards.cs
  62 "Sign Artist" (1.1.3) by Mughisi (0.13s) - SignArtist.cs
  63 "Skins" (1.2.9) by MalkoR (7.45s) - Skins.cs
  64 "Spin Drop" (1.0.5) by Iv Misticos (0.68s) - SpinDrop.cs
  65 "Stack Size Controller" (2.0.0) by Canopy Sheep (0.32s) - StackSizeController.cs
  66 "StorageCleaner" (0.1.1) by k1lly0u (0.01s) - StorageCleaner.cs
  67 "ThirdPerson" (0.1.4) by Wulf/lukespragg (0.01s) - ThirdPerson.cs
  68 "Timed Execute" (0.7.3) by PaiN (16.70s) - TimedExecute.cs
  69 "TimeOfDay" (2.3.4) by FuJiCuRa (0.01s) - TimeOfDay.cs
  70 "TruePVE" (0.9.1) by ignignokt84 (646.27s) - TruePVE.cs
  71 "Vehicle Licence" (1.2.1) by Sorrow (0.06s) - VehicleLicence.cs
  72 "Warp System" (1.9.14) by PaiN (0.75s) - WarpSystem.cs
  73 "Where's My Corpse" (0.6.2) by Fuji/LeoCurtss (3.39s) - WheresMyCorpse.cs
  74 "ZLevelsRemastered" (2.9.5) by FuJiCuRa (117.28s) - ZLevelsRemastered.cs
  75 "ZoneManager" (2.5.16) by Reneb / Nogrod (716.16s) - ZoneManager.cs
  76 "Unburnable Meat" (1.0.1) by S642667 (0.01s) - UnburnableMeat.cs
  77 "Vehicle Locks" (1.0.2) by MrPoundsign (0.02s) - VehicleLocks.cs
  78 "Slap" (1.2.1) by Wulf/lukespragg (0.07s) - Slap.cs
  79 "NPC Target" (1.0.1) by Iv Misticos (3.07s) - NpcTarget.cs
  80 ItemPuller - Unloaded
  81 LustyMap - Unloaded


Maybe you see a plugin that is outadet or "dangerous", or just uses, too much ressources.
The number in brackets behind the author means the compiling time?

Orange
Plugin Developer
In response to Toliman ():
I can see use the console command "oxide.plugin". but it shows only the list of installed (loaded/un...
Number like (2.02s) means like "total plugin work time is 2 seconds". More value -> more work -> more cpu usage. Strange that country block using so much "work" on your server (400)
2CHEVSKII
Plugin Developer
In response to Toliman ():
Hi,
is there a way to see how much "influence" each plugin has on the server.
Like calledh...
There are some things, that look "awful", but can not be avoided by the options Oxide provide us (I mean plugin devs), such as using hooks to cancel specific actions every time they are triggered. 
But here is the thing - in the given example in your post - there is nothing which could struggle server to perform, I doubt this code would take even 1ms to execute. Sadly enough - Oxide does not allow async, but it does allow coroutines (syncronous tasks which get split across multiple passes (frames/seconds etc.)), so server will not stop other work until the heavy function finishes its execute.
At the conclusion - there are not many plugins which can really drop performance of your server.
pookins
In response to Toliman ():
Hi,
is there a way to see how much "influence" each plugin has on the server.
Like calledh...
I have a couple of plugins that use a lot of resources but they compensate by adding value to the game.

15 "Dangerous Treasures" (1.3.0) by nivex (268.85s)

08 "BotSpawn" (1.9.0) by Steenamaroo (1327.81s) - BotSpawn.cs
I have approx 375 bots running around the map which adds a lot of interest to gameplay.