Skip to content

Commit

Permalink
Clear stats at the beginning of compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Mar 19, 2024
1 parent 9b3937c commit ec2ecc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/codegen/codegen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,7 @@ module Dump = struct
Buffer.add_string buf (String.make (String.length header) '-' ^ "\n");
loop entries 0;
end;
close();
Hashtbl.clear stats
close()
end

(*
Expand Down
3 changes: 3 additions & 0 deletions src/compiler/compilationCache.ml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class cache = object(self)
Hashtbl.clear native_libs;
tasks <- PriorityQueue.Empty

method clear_stats =
Hashtbl.iter (fun _ cc -> Hashtbl.clear cc#get_invalidation_stats) contexts

(* contexts *)

method get_context sign =
Expand Down
1 change: 1 addition & 0 deletions src/compiler/serverCompilationContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ let reset sctx =
stats.s_classes_built := 0;
stats.s_methods_typed := 0;
stats.s_macros_called := 0;
sctx.cs#clear_stats;
Hashtbl.clear Timer.htimers;
Helper.start_time := get_time()

Expand Down

0 comments on commit ec2ecc9

Please sign in to comment.