Skip to content

Commit

Permalink
add timer for gsplot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Chang Guo committed May 22, 2024
1 parent 308cdc6 commit c7acc41
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/simulations/gray-scott/plot/gsplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import matplotlib.pyplot as plt # pylint: disable=import-error
import matplotlib.gridspec as gridspec # pylint: disable=import-error
import decomp # pylint: disable=import-error
import time


def SetupArgs():
Expand Down Expand Up @@ -128,6 +129,7 @@ def read_data(args, fr, start_coord, size_dims):


if __name__ == "__main__":
start_time = time.time()
# fontsize on plot
fontsize = 24

Expand Down Expand Up @@ -185,3 +187,13 @@ def read_data(args, fr, start_coord, size_dims):
plot_step = plot_step + 1

fr.close()

# Record the end time
end_time = time.time()

# Calculate the elapsed time
elapsed_time = end_time - start_time

print(f"Elapsed Time: {elapsed_time} seconds")


0 comments on commit c7acc41

Please sign in to comment.