Translate Profiler from CS to JS