2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
10 type serialized_globals
= Serialized_globals
12 let serialize_globals () = Serialized_globals
14 type rollout_flags
= {
15 use_direct_decl_parser
: bool;
16 longlived_workers
: bool;
17 require_saved_state
: bool;
19 force_shallow_decl_fanout
: bool;
20 log_from_client_when_slow_monitor_connections
: bool;
21 naming_sqlite_in_hack_64
: bool;
22 use_hack_64_naming_table
: bool;
23 enable_disk_heap
: bool;
24 ide_max_num_decls
: int;
25 ide_max_num_shallow_decls
: int;
26 ide_max_num_linearizations
: int;
31 let deserialize_globals _
= ()
33 let set_use_watchman _
= ()
35 let set_use_full_fidelity_parser _
= ()
37 let set_lazy_incremental _
= ()
39 let set_search_chunk_size _
= ()
41 let set_changed_mergebase _
= ()
45 let set_hhconfig_version _
= ()
47 let set_rollout_flags _
= ()
49 let typechecker_exit _ _ _ ~exit_type
:_ ~exit_code
:_ ~exit_status
:_ ~is_oom
:_
=
87 let init_batch_tool ~init_id
:_ ~root
:_ ~time
:_
= ()
89 let starting_first_server _
= ()
91 let refuse_to_restart_server ~reason
:_ ~server_state
:_ ~version_matches
:_
= ()
93 let server_receipt_to_monitor_write_exn ~server_receipt_to_monitor_file
:_ _
= ()
95 let server_receipt_to_monitor_read_exn ~server_receipt_to_monitor_file
:_ _ _
=
99 _ ~state_distance
:_ ~approach_name
:_ ~init_error
:_ ~init_type
:_
=
102 let server_is_partially_ready () = ()
104 let server_is_ready _
= ()
106 let load_deptable_end _
= ()
108 let saved_state_download_and_load_done
109 ~load_state_approach
:_
112 ~load_state_natively_64bit
:_
116 let tried_to_be_hg_aware_with_precomputed_saved_state_warning _
= ()
118 let init_start ~experiments_config_meta
:_ _
= ()
122 let load_state_worker_end ~is_cached
:_ _ _
= ()
124 let vcs_changed_files_end _ _
= ()
126 let type_check_dirty ~start_t
:_ ~dirty_count
:_ ~recheck_count
:_
= ()
128 let out_of_date _
= ()
130 let lock_stolen _
= ()
132 let client_init ~init_id
:_ ~custom_columns
:_ _
= ()
134 let serverless_ide_init ~init_id
:_
= ()
136 let client_set_mode _
= ()
138 let serverless_ide_set_root _
= ()
140 let client_start _
= ()
142 let client_stop _
= ()
144 let client_restart ~data
:_
= ()
146 let client_check_start () = ()
148 let client_check _ _
= ()
150 let client_lsp_method_handled
156 ~result_extra_telemetry
:_
159 ~start_hh_server_state
:_
161 ~serverless_ide_flag
:_
=
164 let client_lsp_method_exception
171 ~start_hh_server_state
:_
173 ~serverless_ide_flag
:_
179 let serverless_ide_bug ~message
:_ ~data
:_
= ()
181 let client_lsp_exception ~root
:_ ~message
:_ ~data_opt
:_ ~source
:_
= ()
183 let serverless_ide_startup ~component
:_ ~start_time
:_
= ()
185 let serverless_ide_local_files ~local_file_count
:_
= ()
187 let serverless_ide_destroy_ok _
= ()
189 let serverless_ide_destroy_error _ _ _
= ()
192 ~external_exit_status
:_
193 ~underlying_exit_status
:_
200 let client_bad_exit ~command_name
:_ _ _
= ()
202 let glean_globalrev_supplied ~globalrev
:_
= ()
204 let glean_globalrev_from_hg ~globalrev
:_ ~start_time
:_
= ()
206 let glean_globalrev_error _
= ()
208 let glean_init _ ~start_time
:_
= ()
210 let glean_init_failure _ ~stack
:_
= ()
212 let glean_fetch_namespaces ~count
:_ ~start_time
:_
= ()
214 let glean_fetch_namespaces_error _
= ()
216 let ranked_autocomplete_duration ~start_time
:_
= ()
218 let ranked_autocomplete_request_duration ~start_time
:_
= ()
220 let monitor_dead_but_typechecker_alive () = ()
222 let client_established_connection _
= ()
224 let client_establish_connection_exception _
= ()
226 let client_connect_once ~t_start
:_
= ()
228 let client_connect_once_failure ~t_start
:_ _
= ()
230 let client_connect_to_monitor_slow_log () = ()
232 let client_connect_autostart () = ()
234 let check_response _
= ()
236 let got_client_channels _
= ()
238 let get_client_channels_exception _
= ()
240 let got_persistent_client_channels _
= ()
242 let get_persistent_client_channels_exception _
= ()
244 let handled_connection _
= ()
246 let handle_connection_exception _ _
= ()
248 let handled_persistent_connection _
= ()
250 let handle_persistent_connection_exception _ _ ~is_fatal
:_
= ()
253 _ ~start_t
:_ ~major_gc_time
:_ ~minor_gc_time
:_ ~parsed_files
:_
=
256 let remote_scheduler_get_dirty_files_end _ _
= ()
258 let remote_scheduler_update_dependency_graph_end ~edges
:_ _
= ()
260 let remote_scheduler_save_naming_end _
= ()
262 let credentials_check_failure _ _
= ()
264 let credentials_check_end _ _
= ()
266 let remote_worker_type_check_end _
= ()
268 let remote_worker_load_naming_end _
= ()
270 let recheck_end _ _ _ _ _
= ()
272 let indexing_end ~desc
:_ _
= ()
274 let parsing_end _ _ ~parsed_count
:_
= ()
276 let parsing_end_for_init _ _ ~parsed_count
:_ ~desc
:_
= ()
278 let parsing_end_for_typecheck _ _ ~parsed_count
:_
= ()
280 let naming_costly_iter ~start_t
:_
= ()
282 let naming_end ~count
:_ _ _
= ()
284 let global_naming_end ~count
:_ ~desc
:_ ~heap_size
:_ ~start_t
:_
= ()
286 let run_search_end _
= ()
288 let update_search_end _ _
= ()
290 let naming_from_saved_state_end _
= ()
292 let naming_sqlite_local_changes_nonempty _
= ()
294 let type_decl_end _
= ()
296 let first_redecl_end _ _
= ()
298 let second_redecl_end _ _
= ()
300 let type_check_primary_position_bug ~current_file
:_ ~message
:_ ~stack
:_
= ()
302 let type_check_exn_bug ~path
:_ ~pos
:_ ~e
:_
= ()
304 let invariant_violation_bug ~path
:_ ~pos
:_ ~desc
:_ _
= ()
317 let notifier_returned _ _
= ()
319 let load_state_exn _
= ()
321 let prechecked_update_rechecked _
= ()
323 let prechecked_evaluate_init _ _
= ()
325 let prechecked_evaluate_incremental _ _
= ()
327 let check_mergebase_failed _ _
= ()
329 let check_mergebase_success _
= ()
331 let type_at_pos_batch ~start_time
:_ ~num_files
:_ ~num_positions
:_ ~results
:_
=
334 let with_id ~stage
:_ _ f
= f
()
336 let with_rechecked_stats _ _ _ f
= f
()
338 let with_init_type _ f
= f
()
340 let with_check_kind _ f
= f
()
342 let state_loader_dirty_files _
= ()
344 let changed_while_parsing_end _
= ()
346 let save_decls_end _ _
= ()
348 let save_decls_failure _
= ()
350 let load_decls_end _
= ()
352 let load_decls_failure _ _
= ()
354 let saved_state_load_ok _ ~start_time
:_
= ()
356 let saved_state_load_failure _ ~start_time
:_
= ()
358 let saved_state_dirty_files_ok ~start_time
:_
= ()
360 let saved_state_dirty_files_failure _ ~start_time
:_
= ()
362 (** Informant events *)
363 let init_informant_prefetcher_runner _
= ()
365 let informant_decision_on_saved_state
366 ~start_t
:_ ~state_distance
:_ ~incremental_distance
:_
=
369 let informant_induced_kill _
= ()
371 let informant_induced_restart _
= ()
373 let informant_no_xdb_result _
= ()
375 let informant_prefetcher_success _
= ()
377 let informant_prefetcher_failed _ _
= ()
379 let informant_prefetcher_timed_out _
= ()
381 let informant_state_leave _
= ()
383 let find_svn_rev_failed _ _
= ()
385 let find_svn_rev_success _
= ()
387 let find_xdb_match_failed _ _
= ()
389 let find_xdb_match_success _
= ()
391 let find_xdb_match_timed_out _
= ()
393 let informant_find_saved_state_failed _
= ()
395 let informant_find_saved_state_success ~distance
:_ _
= ()
397 let revision_tracker_init_svn_rev_failed _
= ()
399 let xdb_malformed_result _
= ()
401 (** Watchman Event Watcher client running in the informant *)
402 let informant_watcher_not_available _
= ()
404 let informant_watcher_unknown_state _
= ()
406 let informant_watcher_mid_update_state _
= ()
408 let informant_watcher_settled_state _
= ()
410 let informant_watcher_starting_server_from_settling _
= ()
412 (** Server Monitor events *)
413 let accepting_on_socket_exception _
= ()
415 let malformed_build_id _
= ()
417 let send_fd_failure _
= ()
419 let typechecker_already_running _
= ()
421 (** Watchman Event Watcher events *)
422 let init_watchman_event_watcher _ _
= ()
424 let init_watchman_failed _
= ()
426 let restarting_watchman_subscription _
= ()
428 let watchman_uncaught_exception _
= ()
430 let monitor_giving_up_exception _
= ()
432 let processed_clients _
= ()
434 let search_symbol_index
445 let shallow_decl_errors_emitted _
= ()
447 let server_progress_write_exn ~server_progress_file
:_ _
= ()
449 let server_progress_read_exn ~server_progress_file
:_ _
= ()
451 let worker_exception _
= ()
453 module ProfileTypeCheck
= struct
454 let process_file ~recheck_id
:_ ~path
:_ ~telemetry
:_
= ()
456 let compute_tast ~path
:_ ~telemetry
:_ ~start_time
:_
= ()
458 let get_telemetry_url ~init_id
:_ ~recheck_id
:_
= ""
461 module CGroup
= struct
483 module ReHulk
= struct
490 ~input_upload_duration
:_
491 ~input_fetch_duration
:_
492 ~output_upload_duration
:_
493 ~output_fetch_duration
:_
495 ~execution_duration
:_
=
499 module Memory
= struct
500 let profile_if_needed () = ()
503 module ProfileDecl
= struct
513 ~subdecl_member_name
:_
516 ~subdecl_start_time
:_
=
521 let rage_start ~rageid
:_ ~desc
:_ ~root
:_ ~from
:_ ~disk_config
:_
= ()
533 ~experiments_config_meta
:_
539 let get_telemetry_url ~
(rageid
: string) : string = rageid