<commit_before>-module (m_etp_codec_utils).
-include_lib("../m_etp_store/include/m_etp_data.hrl").

-export([decode_session_request2record_with_id/2,decode_json_protocol2record/1,decode_session_request2record/1]).

decode_json_protocol2record(Data)->
   try
		Decoded=jiffy:decode(Data),
		Name=ej:get({"name"}, Decoded),
		MessageType=ej:get({"messageType"},Decoded),
		ProtocolNo=ej:get({"protocol"},Decoded),
		NameSpace=ej:get({"namespace"},Decoded),
		CompiledSchema=eavro:parse_schema(Data),
		lager:debug("Parsed schema to:~p",[CompiledSchema]),
		ETPProtocolRecord=#m_etp_protocol{
			name=Name,
			protocol_no=ProtocolNo,<commit_msg>Added full name to schema record<commit_after>-module (m_etp_codec_utils).
-include_lib("../m_etp_store/include/m_etp_data.hrl").

-export([decode_session_request2record_with_id/2,decode_json_protocol2record/1,decode_session_request2record/1]).

decode_json_protocol2record(Data)->
   try
		Decoded=jiffy:decode(Data),
        %lager:debug("Decoded data:~p",[Data]),
		Name=ej:get({"name"}, Decoded),
		MessageType=ej:get({"messageType"},Decoded),
		ProtocolNo=ej:get({"protocol"},Decoded),
		NameSpace=ej:get({"namespace"},Decoded),
		CompiledSchema=eavro:parse_schema(Data),
		FullName=erlang:iolist_to_binary([NameSpace,<<".">>, Name]),
		ETPProtocolRecord=#m_etp_protocol{
			full_name=FullName,
			name=Name,
			protocol_no=ProtocolNo,
{'fraction_non_alphanumeric': 0.1613603473227207, 'fraction_numerical': 0.010130246020260492, 'mean_word_length': 8.73943661971831, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5990312', 'n_tokens_mistral': 543, 'n_tokens_neox': 510, 'n_words': 44}