# How to get "total snapshots" for profile results as Int?

**URL:** <https://discourse.julialang.org/t/how-to-get-total-snapshots-for-profile-results-as-int/89057>\
**Category:** General Usage\
**Created:** [October 21, 2022, 12:12pm UTC](https://discourse.julialang.org/t/how-to-get-total-snapshots-for-profile-results-as-int/89057 "2022-10-21T12:12:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrey2185](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrey2185/32/9889_2.png) [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Post date:** [October 21, 2022, 12:12pm UTC](https://discourse.julialang.org/t/how-to-get-total-snapshots-for-profile-results-as-int/89057/1 "2022-10-21T12:12:46Z")

</div>

Hellow, how to get “total snapshots” for profile results as Int ?

```julia
using Profile
f() = 1
for i = 1 : 100
  @profile f() 
end
Profile.print()

```

```julia
Overhead ╎ [+additional indent] Count File:Line; Function
=========================================================
 ╎1 @Base\client.jl:522; _start()
...
 ╎ ╎ ╎ 1 ...dlib\v1.8\Profile\src\Profile.jl:596; stop_timer
Total snapshots: 1. Utilization: 100% across all threads and tasks. Use the `groupby` kwarg to break down by thread and/or task

```

I need to get the complexity or execution time of a function

Maybe @elapsed is better?

---

<div class="post-metadata">

**Author:** ![andrey2185](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrey2185/32/9889_2.png) [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Post date:** [October 21, 2022, 7:55pm UTC](https://discourse.julialang.org/t/how-to-get-total-snapshots-for-profile-results-as-int/89057/2 "2022-10-21T19:55:47Z")

</div>

idiotic question?
