FIX: only ever calculate version once

FIX: only ever calculate version once

Previously every time we added a global metric version was gathered via shell

diff --git a/lib/internal_metric/global.rb b/lib/internal_metric/global.rb
index 0d9c5b7..f403fb4 100644
--- a/lib/internal_metric/global.rb
+++ b/lib/internal_metric/global.rb
@@ -29,11 +29,14 @@ module DiscoursePrometheus::InternalMetric
       @active_app_reqs = 0
       @queued_app_reqs = 0
       @fault_logged = {}
+
       begin
-        @version = `git rev-list --count HEAD`.to_i
+        @@version ||= `git rev-list --count HEAD`.to_i
       rescue
-        @version = 0
+        @@version = 0
       end
+
+      @version = @@version
     end
 
     def collect

GitHub sha: 6cd48809