@@ -955,52 +955,6 @@ async def do_execute(
955955 cell_id = cell_id ,
956956 )
957957
958- elif code .startswith ("%%perfdata_to_variable" ):
959- if len (code .split (" " )) == 1 :
960- self .cell_output (
961- "No variable for export specified. Use: "
962- "%%perfdata_to_variable myvar" ,
963- "stdout" ,
964- )
965- else :
966- varname = code .split (" " )[1 ]
967- # for multi cell mode, we might have time indices which we want
968- # to communicate to the user, each time_index has the index of
969- # the overall mult cell and the sub index within this cell.
970- # In addition, it has a counter for the number of measurements
971- # each sub cell corresponds to in the list of performance data
972- # measurements, e.g. (2_0, 5), (2_1, 3), (2_2, 7)
973- mcm_time_indices = kernel_context .perfdata_handler .get_time_indices ()
974- mcm_time_indices = list (
975- filter (lambda item : item is not None , mcm_time_indices )
976- )
977-
978- code = (
979- f"{ varname } ="
980- f"{ kernel_context .perfdata_handler .get_perfdata_history ()} "
981- )
982-
983- if mcm_time_indices :
984- code += f"\n { varname } .append({ mcm_time_indices } )"
985-
986- await super ().do_execute (code , silent = True )
987- self .cell_output (
988- "Exported performance data to "
989- + str (varname )
990- + " variable. " ,
991- "stdout" ,
992- )
993- if mcm_time_indices :
994- self .cell_output (
995- "Detected that cells were executed in multi cell mode."
996- + f"Last entry in { varname } is a list that contains "
997- f"the sub indices per cell that were executed in "
998- f"in multi cell mode and a counter for the number of"
999- f" performance measurements within this sub cell, "
1000- f"e.g. f{ mcm_time_indices [- 1 ]} " ,
1001- "stdout" ,
1002- )
1003- return self .standard_reply ()
1004958 elif code .startswith ("%%perfdata_to_json" ):
1005959 if len (code .split (" " )) == 1 :
1006960 self .cell_output (
0 commit comments