<commit_before>library sintr_worker_lib.instrumentation_lib;

import 'dart:convert';

export 'instrumentation_processor.dart';

_sanityCheck(String ln) {
  //~1422655684588:Noti:
  //01234567890123456789

  List<String> splits = ln.split(":");
  String msgType = splits[1];

  // Sanity check control signature
  if (ln[0] != "~") throw "Message signature validation failed ~";
  if (ln[14] != ":") throw "Message signature validation failed :";
  if (msgType.length <
      3) throw "Message signature validation failed no Msgtype";
}

final extractPerf = (String ln) {
  _sanityCheck(ln);
  List<String> splits = ln.split(":");
  String msgType = splits[1];

  if (msgType == "Perf") return ln;
  else return null;

  int time = int.parse(splits[0].substring(1));
  return [time, msgType];
};

Map _reqMap = {};
final extractReqResPerf = (String ln) {<commit_msg>Build fix<commit_after>library sintr_worker_lib.instrumentation_lib;

import 'dart:convert';

export '../instrumentation_processor.dart';

_sanityCheck(String ln) {
  //~1422655684588:Noti:
  //01234567890123456789

  List<String> splits = ln.split(":");
  String msgType = splits[1];

  // Sanity check control signature
  if (ln[0] != "~") throw "Message signature validation failed ~";
  if (ln[14] != ":") throw "Message signature validation failed :";
  if (msgType.length <
      3) throw "Message signature validation failed no Msgtype";
}

final extractPerf = (String ln) {
  _sanityCheck(ln);
  List<String> splits = ln.split(":");
  String msgType = splits[1];

  if (msgType == "Perf") return ln;
  else return null;

  int time = int.parse(splits[0].substring(1));
  return [time, msgType];
};

Map _reqMap = {};
final extractReqResPerf = (String ln) {
{'fraction_non_alphanumeric': 0.1474840948525159, 'fraction_numerical': 0.04742625795257374, 'mean_word_length': 4.492063492063492, 'pattern_counts': {'":': 6, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2644989', 'n_tokens_mistral': 654, 'n_tokens_neox': 579, 'n_words': 151}