{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "595a07c5-0ecc-4f3e-8cbe-63fc64b456da",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling MetagraphOptimization [3e869610-d48d-4942-ba70-c1b702a33ca4]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "using BenchmarkTools; using Profile; using PProf; using Revise; using MetagraphOptimization;\n",
    "Threads.nthreads()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "163f84be-1e2e-480e-9944-1fa4e0eedf3b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 1 NUMA nodes\n",
      "CUDA is non-functional\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "QED Process: 'ke->kkkkke'"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "machine = get_machine_info()\n",
    "model = QEDModel()\n",
    "process = parse_process(\"ke->kkkkke\", model)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "6c2eef40-5df0-4396-8e62-5204c4de61f3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"profile.pb.gz\""
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Main binary filename not available.\n",
      "Serving web UI on http://localhost:57599\n"
     ]
    }
   ],
   "source": [
    "gen_graph(parse_process(\"ke->kke\", model))\n",
    "Profile.clear()\n",
    "@profile gen_graph(process)\n",
    "pprof()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.9.4",
   "language": "julia",
   "name": "julia-1.9"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.9.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
