From 1a5b4ec37e65fbbc56a339625bed4d290ec8f9f6 Mon Sep 17 00:00:00 2001 From: Daniel Vedder <daniel.vedder@idiv.de> Date: Wed, 4 Oct 2023 12:47:54 +0200 Subject: [PATCH] Added profiling script --- Manifest.toml | 45 +++++++++++++++++++++++++++++++++++++++------ runprofile.jl | 22 ++++++++++++++++++++++ 2 files changed, 61 insertions(+), 6 deletions(-) create mode 100755 runprofile.jl diff --git a/Manifest.toml b/Manifest.toml index b441b3b..97c3a35 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,6 +1,6 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.1" +julia_version = "1.9.3" manifest_format = "2.0" project_hash = "95079802d452de8f9a12096a3facc5e629c3d6d3" @@ -22,10 +22,20 @@ uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" version = "3.4.0" [[deps.Agents]] -deps = ["CSV", "DataFrames", "DataStructures", "Distributed", "Downloads", "Graphs", "JLD2", "LazyArtifacts", "LightOSM", "LinearAlgebra", "Pkg", "ProgressMeter", "Random", "Requires", "Scratch", "StatsBase"] -path = "../Models/agentsjl" +deps = ["CSV", "CommonSolve", "DataFrames", "DataStructures", "Distributed", "Distributions", "Downloads", "Graphs", "JLD2", "LazyArtifacts", "LightOSM", "LinearAlgebra", "Pkg", "ProgressMeter", "Random", "Rotations", "Scratch", "StaticArrays", "StatsBase"] +git-tree-sha1 = "adb98dc3c06912eb2af18ba80365b9a8a61806c5" uuid = "46ada45e-f475-11e8-01d0-f70cc89e6671" -version = "5.6.2" +version = "5.17.1" + + [deps.Agents.extensions] + AgentsArrow = "Arrow" + AgentsOSMVisualizations = "OSMMakie" + AgentsVisualizations = "Makie" + + [deps.Agents.weakdeps] + Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45" + Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" + OSMMakie = "76b6901f-8821-46bb-9129-841bc9cfe677" [[deps.ArchGDAL]] deps = ["CEnum", "ColorTypes", "Dates", "DiskArrays", "Extents", "GDAL", "GeoFormatTypes", "GeoInterface", "GeoInterfaceRecipes", "ImageCore", "Tables"] @@ -169,6 +179,11 @@ git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" version = "1.0.2" +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + [[deps.CommonSubexpressions]] deps = ["MacroTools", "Test"] git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" @@ -184,7 +199,7 @@ version = "4.5.0" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.2+0" +version = "1.0.5+0" [[deps.CompositionsBase]] git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" @@ -839,7 +854,7 @@ version = "2.5.2" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.0" +version = "1.9.2" [[deps.PooledArrays]] deps = ["DataAPI", "Future"] @@ -887,6 +902,12 @@ git-tree-sha1 = "97aa253e65b784fd13e83774cadc95b38011d734" uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" version = "2.6.0" +[[deps.Quaternions]] +deps = ["LinearAlgebra", "Random", "RealDot"] +git-tree-sha1 = "da095158bdc8eaccb7890f9884048555ab771019" +uuid = "94ee1d12-ae83-5a48-8b1c-48b8ff168ae0" +version = "0.7.4" + [[deps.QuickHeaps]] deps = ["ArrayTools", "DataStructures"] git-tree-sha1 = "ff720a9c8356004cc9e3d109cdcb327510345edc" @@ -901,6 +922,12 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + [[deps.RecipesBase]] deps = ["SnoopPrecompile"] git-tree-sha1 = "18c35ed630d7229c5584b945641a73ca83fb5213" @@ -936,6 +963,12 @@ git-tree-sha1 = "68db32dff12bb6127bac73c209881191bf0efbb7" uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" version = "0.3.0+0" +[[deps.Rotations]] +deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] +git-tree-sha1 = "54ccb4dbab4b1f69beb255a2c0ca5f65a9c82f08" +uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" +version = "1.5.1" + [[deps.SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" diff --git a/runprofile.jl b/runprofile.jl new file mode 100755 index 0000000..a223bfd --- /dev/null +++ b/runprofile.jl @@ -0,0 +1,22 @@ +#!/usr/bin/env julia +# A wrapper script to start a Persefone simulation and do a profiling run +# (https://docs.julialang.org/en/v1/stdlib/Profile/). + +using Pkg +Pkg.activate(".") +using Persefone + +using Profile +Profile.clear() + +@profile simulate() + +open("profile_flat.txt", "w") do s + Profile.print(IOContext(s, :displaysize=>(300,145)), format=:flat, mincount=10, sortedby=:count) +end + +open("profile_tree.txt", "w") do s + Profile.print(IOContext(s, :displaysize=>(300,300)), mincount=10) +end + + -- GitLab