# SQLAlchemy profiling report

Total queries: 3046; total time: 3705.49 ms

## Queries

Count | Total ms | Mean ms | Max ms | % total | Query
--- | --- | --- | --- | --- | ---
869 | 674.48 | 0.78 | 4.40 | 18.20 | SELECT c.oid FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE (pg_catalog.pg_table_is_visible(c.oid)) AND c.relname = %(table_name)s AND c.relkind in (...
    SELECT c.oid FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE (pg_catalog.pg_table_is_visible(c.oid)) AND c.relname = %(table_name)s AND c.relkind in ('r', 'v', 'm', 'f', 'p')
Callsites /home/frank/projects/PsyNet/psynet/data.py:584 in list_fkeys (841) /home/frank/projects/PsyNet/psynet/data.py:791 in ingest_to_model (28)
841 | 656.52 | 0.78 | 2.18 | 17.72 | SELECT r.conname, pg_catalog.pg_get_constraintdef(r.oid, true) as condef, n.nspname as conschema FROM pg_catalog.pg_constraint r, pg_namespace n, pg_class c WHERE r.conrelid = %(table)s AND r.conty...
    SELECT r.conname, pg_catalog.pg_get_constraintdef(r.oid, true) as condef, n.nspname as conschema FROM pg_catalog.pg_constraint r, pg_namespace n, pg_class c WHERE r.conrelid = %(table)s AND r.contype = 'f' AND c.oid = confrelid AND n.oid = c.relnamespace ORDER BY 1
Callsites /home/frank/projects/PsyNet/psynet/data.py:584 in list_fkeys (841)
72 | 65.38 | 0.91 | 4.04 | 1.76 | SELECT participant_1.id AS participant_1_id, participant_link_barrier.id AS participant_link_barrier_id, participant_link_barrier.creation_time AS participant_link_barrier_creation_time, participan...
    SELECT participant_1.id AS participant_1_id, participant_link_barrier.id AS participant_link_barrier_id, participant_link_barrier.creation_time AS participant_link_barrier_creation_time, participant_link_barrier.property1 AS participant_link_barrier_property1, participant_link_barrier.property2 AS participant_link_barrier_property2, participant_link_barrier.property3 AS participant_link_barrier_property3, participant_link_barrier.property4 AS participant_link_barrier_property4, participant_link_barrier.property5 AS participant_link_barrier_property5, participant_link_barrier.failed AS participant_link_barrier_failed, participant_link_barrier.failed_reason AS participant_link_barrier_failed_reason, participant_link_barrier.time_of_death AS participant_link_barrier_time_of_death, participant_link_barrier.details AS participant_link_barrier_details, participant_link_barrier.barrier_id AS participant_link_barrier_barrier_id, participant_link_barrier.barrier_class AS participant_link_barrier_barrier_class, participant_link_barrier.participant_id AS participant_link_barrier_participant_id, participant_link_barrier.arrival_time AS participant_link_barrier_arrival_time, participant_link_barrier.departure_time AS participant_link_barrier_departure_time, participant_link_barrier.released AS participant_link_barrier_released, participant_link_barrier.type AS participant_link_barrier_type FROM participant AS participant_1 JOIN participant_link_barrier ON participant_1.id = participant_link_barrier.participant_id AND participant_link_barrier.released = false WHERE participant_1.id IN (%(primary_keys_1)s) AND participant_1.type IN (%(type_1_1)s, %(type_1_2)s)
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:3281 in get_participant_from_unique_id (24) /home/frank/projects/PsyNet/psynet/experiment.py:3852 in route_participant_status (24) /home/frank/projects/PsyNet/psynet/experiment.py:2495 in process_response (23) /home/frank/projects/PsyNet/psynet/serialize.py:119 in load_sql_object (1)
70 | 45.94 | 0.66 | 1.04 | 1.24 | SELECT asset.id AS asset_id, asset.creation_time AS asset_creation_time, asset.property1 AS asset_property1, asset.property2 AS asset_property2, asset.property3 AS asset_property3, asset.property4 ...
    SELECT asset.id AS asset_id, asset.creation_time AS asset_creation_time, asset.property1 AS asset_property1, asset.property2 AS asset_property2, asset.property3 AS asset_property3, asset.property4 AS asset_property4, asset.property5 AS asset_property5, asset.details AS asset_details, asset.psynet_version AS asset_psynet_version, asset.deployment_id AS asset_deployment_id, asset.deposited AS asset_deposited, asset.inherited AS asset_inherited, asset.inherited_from AS asset_inherited_from, asset.module_id AS asset_module_id, asset.local_key AS asset_local_key, asset.key_within_module AS asset_key_within_module, asset.key_within_experiment AS asset_key_within_experiment, asset.export_path AS asset_export_path, asset.is_global AS asset_is_global, asset.module_state_id AS asset_module_state_id, asset.participant_id AS asset_participant_id, asset.trial_id AS asset_trial_id, asset.node_id AS asset_node_id, asset.network_id AS asset_network_id, asset.description AS asset_description, asset.personal AS asset_personal, asset.content_id AS asset_content_id, asset.host_path AS asset_host_path, asset.url AS asset_url, asset.is_folder AS asset_is_folder, asset.data_type AS asset_data_type, asset.extension AS asset_extension, asset.storage AS asset_storage, asset.node_definition AS asset_node_definition, asset.type AS asset_type FROM asset WHERE asset.participant_id IS NULL AND asset.module_id = %(module_id_1)s
Callsites /home/frank/projects/PsyNet/psynet/utils.py:146 in call_function_with_context (70)
72 | 45.33 | 0.63 | 0.95 | 1.22 | SELECT module_state.participant_id AS module_state_participant_id, module_state.creation_time AS module_state_creation_time, module_state.property1 AS module_state_property1, module_state.property2...
    SELECT module_state.participant_id AS module_state_participant_id, module_state.creation_time AS module_state_creation_time, module_state.property1 AS module_state_property1, module_state.property2 AS module_state_property2, module_state.property3 AS module_state_property3, module_state.property4 AS module_state_property4, module_state.property5 AS module_state_property5, module_state.failed AS module_state_failed, module_state.failed_reason AS module_state_failed_reason, module_state.time_of_death AS module_state_time_of_death, module_state.details AS module_state_details, module_state.id AS module_state_id, module_state.module_id AS module_state_module_id, module_state.time_started AS module_state_time_started, module_state.time_finished AS module_state_time_finished, module_state.time_aborted AS module_state_time_aborted, module_state.started AS module_state_started, module_state.finished AS module_state_finished, module_state.aborted AS module_state_aborted, module_state.type AS module_state_type FROM module_state WHERE module_state.participant_id IN (%(primary_keys_1)s)
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:3281 in get_participant_from_unique_id (24) /home/frank/projects/PsyNet/psynet/experiment.py:3852 in route_participant_status (24) /home/frank/projects/PsyNet/psynet/experiment.py:2495 in process_response (23) /home/frank/projects/PsyNet/psynet/serialize.py:119 in load_sql_object (1)
47 | 43.34 | 0.92 | 2.86 | 1.17 | INSERT INTO request (creation_time, property1, property2, property3, property4, property5, details, unique_id, duration, method, endpoint, params, type) VALUES (%(creation_time)s, %(property1)s, %(...
    INSERT INTO request (creation_time, property1, property2, property3, property4, property5, details, unique_id, duration, method, endpoint, params, type) VALUES (%(creation_time)s, %(property1)s, %(property2)s, %(property3)s, %(property4)s, %(property5)s, %(details)s, %(unique_id)s, %(duration)s, %(method)s, %(endpoint)s, %(params)s, %(type)s) RETURNING request.id
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:872 in after_request (47)
67 | 41.08 | 0.61 | 1.02 | 1.11 | SELECT module_state.id AS module_state_id, module_state.creation_time AS module_state_creation_time, module_state.property1 AS module_state_property1, module_state.property2 AS module_state_propert...
    SELECT module_state.id AS module_state_id, module_state.creation_time AS module_state_creation_time, module_state.property1 AS module_state_property1, module_state.property2 AS module_state_property2, module_state.property3 AS module_state_property3, module_state.property4 AS module_state_property4, module_state.property5 AS module_state_property5, module_state.failed AS module_state_failed, module_state.failed_reason AS module_state_failed_reason, module_state.time_of_death AS module_state_time_of_death, module_state.details AS module_state_details, module_state.module_id AS module_state_module_id, module_state.participant_id AS module_state_participant_id, module_state.time_started AS module_state_time_started, module_state.time_finished AS module_state_time_finished, module_state.time_aborted AS module_state_time_aborted, module_state.started AS module_state_started, module_state.finished AS module_state_finished, module_state.aborted AS module_state_aborted, module_state.type AS module_state_type FROM module_state WHERE module_state.id IN (%(primary_keys_1)s)
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:2495 in process_response (22) /home/frank/projects/PsyNet/psynet/experiment.py:3281 in get_participant_from_unique_id (22) /home/frank/projects/PsyNet/psynet/experiment.py:3852 in route_participant_status (22) /home/frank/projects/PsyNet/psynet/serialize.py:119 in load_sql_object (1)
23 | 38.46 | 1.67 | 3.66 | 1.04 | SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, part...
    SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, participant.property3 AS participant_property3, participant.property4 AS participant_property4, participant.property5 AS participant_property5, participant.failed AS participant_failed, participant.failed_reason AS participant_failed_reason, participant.time_of_death AS participant_time_of_death, participant.details AS participant_details, participant.type AS participant_type, participant.fingerprint_hash AS participant_fingerprint_hash, participant.recruiter_id AS participant_recruiter_id, participant.worker_id AS participant_worker_id, participant.assignment_id AS participant_assignment_id, participant.unique_id AS participant_unique_id, participant.hit_id AS participant_hit_id, participant.mode AS participant_mode, participant.end_time AS participant_end_time, participant.base_pay AS participant_base_pay, participant.bonus AS participant_bonus, participant.entry_information AS participant_entry_information, participant.status AS participant_status, participant.elt_id AS participant_elt_id, participant.elt_id_max AS participant_elt_id_max, participant.time_credit AS participant_time_credit, participant.estimated_max_time_credit AS participant_estimated_max_time_credit, participant.progress AS participant_progress, participant.time_credit_fixes AS participant_time_credit_fixes, participant.progress_fixes AS participant_progress_fixes, participant.page_uuid AS participant_page_uuid, participant.page_count AS participant_page_count, participant.aborted AS participant_aborted, participant.complete AS participant_complete, participant.answer AS participant_answer, participant.answer_accumulators AS participant_answer_accumulators, participant.sequences AS participant_sequences, participant.branch_log AS participant_branch_log, participant.for_loops AS participant_for_loops, participant.failure_tags AS participant_failure_tags, participant.base_payment AS participant_base_payment, participant.performance_reward AS participant_performance_reward, participant.unpaid_bonus AS participant_unpaid_bonus, participant.total_wait_page_time AS participant_total_wait_page_time, participant.client_ip_address AS participant_client_ip_address, participant.answer_is_fresh AS participant_answer_is_fresh, participant.browser_platform AS participant_browser_platform, participant.module_state_id AS participant_module_state_id, participant.current_trial_id AS participant_current_trial_id, participant.trial_status AS participant_trial_status, participant.awaited_async_code_block_process_id AS participant_awaited_async_code_block_process_id, info_1.id AS info_1_id, info_1.creation_time AS info_1_creation_time, info_1.property1 AS info_1_property1, info_1.property2 AS info_1_property2, info_1.property3 AS info_1_property3, info_1.property4 AS info_1_property4, info_1.property5 AS info_1_property5, info_1.failed AS info_1_failed, info_1.failed_reason AS info_1_failed_reason, info_1.time_of_death AS info_1_time_of_death, info_1.details AS info_1_details, info_1.type AS info_1_type, info_1.origin_id AS info_1_origin_id, info_1.network_id AS info_1_network_id, info_1.contents AS info_1_contents, info_1.complete AS info_1_complete, info_1.node_id AS info_1_node_id, info_1.participant_id AS info_1_participant_id, info_1.module_state_id AS info_1_module_state_id, info_1.trial_maker_id AS info_1_trial_maker_id, info_1.definition AS info_1_definition, info_1.finalized AS info_1_finalized, info_1.is_repeat_trial AS info_1_is_repeat_trial, info_1.score AS info_1_score, info_1.performance_reward AS info_1_performance_reward, info_1.parent_trial_id AS info_1_parent_trial_id, info_1.answer AS info_1_answer, info_1.propagate_failure AS info_1_propagate_failure, info_1.response_id AS info_1_response_id, info_1.repeat_trial_index AS info_1_repeat_trial_index, info_1.n_repeat_trials AS info_1_n_repeat_trials, info_1.time_taken AS info_1_time_taken, info_1.time_credit_before_trial AS info_1_time_credit_before_trial, info_1.time_credit_after_trial AS info_1_time_credit_after_trial, info_1.time_credit_from_trial AS info_1_time_credit_from_trial, info_1.progress_before_trial AS info_1_progress_before_trial, info_1.progress_after_trial AS info_1_progress_after_trial, info_1.async_post_trial_required AS info_1_async_post_trial_required, info_1.async_post_trial_requested AS info_1_async_post_trial_requested, info_1.async_post_trial_complete AS info_1_async_post_trial_complete, info_1.async_post_trial_failed AS info_1_async_post_trial_failed FROM participant LEFT OUTER JOIN info AS info_1 ON info_1.id = participant.current_trial_id AND info_1.type IN (%(type_1_1)s, %(type_1_2)s, %(type_1_3)s, %(type_1_4)s, %(type_1_5)s) WHERE participant.id = %(pk_1)s AND participant.type IN (%(type_2_1)s, %(type_2_2)s) FOR UPDATE OF participant
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:2495 in process_response (23)
28 | 36.17 | 1.29 | 2.64 | 0.98 | SELECT a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod), ( SELECT pg_catalog.pg_get_expr(d.adbin, d.adrelid) FROM pg_catalog.pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attn...
    SELECT a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod), ( SELECT pg_catalog.pg_get_expr(d.adbin, d.adrelid) FROM pg_catalog.pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef ) AS DEFAULT, a.attnotnull, a.attrelid as table_oid, pgd.description as comment, a.attgenerated as generated, (SELECT json_build_object( 'always', a.attidentity = 'a', 'start', s.seqstart, 'increment', s.seqincrement, 'minvalue', s.seqmin, 'maxvalue', s.seqmax, 'cache', s.seqcache, 'cycle', s.seqcycle) FROM pg_catalog.pg_sequence s JOIN pg_catalog.pg_class c on s.seqrelid = c."oid" WHERE c.relkind = 'S' AND a.attidentity != '' AND s.seqrelid = pg_catalog.pg_get_serial_sequence( a.attrelid::regclass::text, a.attname )::regclass::oid ) as identity_options FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_description pgd ON ( pgd.objoid = a.attrelid AND pgd.objsubid = a.attnum) WHERE a.attrelid = %(table_oid)s AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
Callsites /home/frank/projects/PsyNet/psynet/data.py:791 in ingest_to_model (28)
31 | 35.41 | 1.14 | 3.79 | 0.96 | SELECT c.relname FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = %(schema)s AND c.relkind in ('r', 'p')
    SELECT c.relname FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = %(schema)s AND c.relkind in ('r', 'p')
Callsites /home/frank/projects/PsyNet/psynet/data.py:581 in list_fkeys (30) /home/frank/projects/PsyNet/psynet/data.py:821 in ingest_zip (1)
24 | 33.52 | 1.40 | 1.96 | 0.90 | SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, part...
    SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, participant.property3 AS participant_property3, participant.property4 AS participant_property4, participant.property5 AS participant_property5, participant.failed AS participant_failed, participant.failed_reason AS participant_failed_reason, participant.time_of_death AS participant_time_of_death, participant.details AS participant_details, participant.type AS participant_type, participant.fingerprint_hash AS participant_fingerprint_hash, participant.recruiter_id AS participant_recruiter_id, participant.worker_id AS participant_worker_id, participant.assignment_id AS participant_assignment_id, participant.unique_id AS participant_unique_id, participant.hit_id AS participant_hit_id, participant.mode AS participant_mode, participant.end_time AS participant_end_time, participant.base_pay AS participant_base_pay, participant.bonus AS participant_bonus, participant.entry_information AS participant_entry_information, participant.status AS participant_status, participant.elt_id AS participant_elt_id, participant.elt_id_max AS participant_elt_id_max, participant.time_credit AS participant_time_credit, participant.estimated_max_time_credit AS participant_estimated_max_time_credit, participant.progress AS participant_progress, participant.time_credit_fixes AS participant_time_credit_fixes, participant.progress_fixes AS participant_progress_fixes, participant.page_uuid AS participant_page_uuid, participant.page_count AS participant_page_count, participant.aborted AS participant_aborted, participant.complete AS participant_complete, participant.answer AS participant_answer, participant.answer_accumulators AS participant_answer_accumulators, participant.sequences AS participant_sequences, participant.branch_log AS participant_branch_log, participant.for_loops AS participant_for_loops, participant.failure_tags AS participant_failure_tags, participant.base_payment AS participant_base_payment, participant.performance_reward AS participant_performance_reward, participant.unpaid_bonus AS participant_unpaid_bonus, participant.total_wait_page_time AS participant_total_wait_page_time, participant.client_ip_address AS participant_client_ip_address, participant.answer_is_fresh AS participant_answer_is_fresh, participant.browser_platform AS participant_browser_platform, participant.module_state_id AS participant_module_state_id, participant.current_trial_id AS participant_current_trial_id, participant.trial_status AS participant_trial_status, participant.awaited_async_code_block_process_id AS participant_awaited_async_code_block_process_id, info_1.id AS info_1_id, info_1.creation_time AS info_1_creation_time, info_1.property1 AS info_1_property1, info_1.property2 AS info_1_property2, info_1.property3 AS info_1_property3, info_1.property4 AS info_1_property4, info_1.property5 AS info_1_property5, info_1.failed AS info_1_failed, info_1.failed_reason AS info_1_failed_reason, info_1.time_of_death AS info_1_time_of_death, info_1.details AS info_1_details, info_1.type AS info_1_type, info_1.origin_id AS info_1_origin_id, info_1.network_id AS info_1_network_id, info_1.contents AS info_1_contents, info_1.complete AS info_1_complete, info_1.node_id AS info_1_node_id, info_1.participant_id AS info_1_participant_id, info_1.module_state_id AS info_1_module_state_id, info_1.trial_maker_id AS info_1_trial_maker_id, info_1.definition AS info_1_definition, info_1.finalized AS info_1_finalized, info_1.is_repeat_trial AS info_1_is_repeat_trial, info_1.score AS info_1_score, info_1.performance_reward AS info_1_performance_reward, info_1.parent_trial_id AS info_1_parent_trial_id, info_1.answer AS info_1_answer, info_1.propagate_failure AS info_1_propagate_failure, info_1.response_id AS info_1_response_id, info_1.repeat_trial_index AS info_1_repeat_trial_index, info_1.n_repeat_trials AS info_1_n_repeat_trials, info_1.time_taken AS info_1_time_taken, info_1.time_credit_before_trial AS info_1_time_credit_before_trial, info_1.time_credit_after_trial AS info_1_time_credit_after_trial, info_1.time_credit_from_trial AS info_1_time_credit_from_trial, info_1.progress_before_trial AS info_1_progress_before_trial, info_1.progress_after_trial AS info_1_progress_after_trial, info_1.async_post_trial_required AS info_1_async_post_trial_required, info_1.async_post_trial_requested AS info_1_async_post_trial_requested, info_1.async_post_trial_complete AS info_1_async_post_trial_complete, info_1.async_post_trial_failed AS info_1_async_post_trial_failed FROM participant LEFT OUTER JOIN info AS info_1 ON info_1.id = participant.current_trial_id AND info_1.type IN (%(type_1_1)s, %(type_1_2)s, %(type_1_3)s, %(type_1_4)s, %(type_1_5)s) WHERE participant.id = %(pk_1)s AND participant.type IN (%(type_2_1)s)
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:3852 in route_participant_status (24)
24 | 32.24 | 1.34 | 1.96 | 0.87 | SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, part...
    SELECT participant.id AS participant_id, participant.creation_time AS participant_creation_time, participant.property1 AS participant_property1, participant.property2 AS participant_property2, participant.property3 AS participant_property3, participant.property4 AS participant_property4, participant.property5 AS participant_property5, participant.failed AS participant_failed, participant.failed_reason AS participant_failed_reason, participant.time_of_death AS participant_time_of_death, participant.details AS participant_details, participant.type AS participant_type, participant.fingerprint_hash AS participant_fingerprint_hash, participant.recruiter_id AS participant_recruiter_id, participant.worker_id AS participant_worker_id, participant.assignment_id AS participant_assignment_id, participant.unique_id AS participant_unique_id, participant.hit_id AS participant_hit_id, participant.mode AS participant_mode, participant.end_time AS participant_end_time, participant.base_pay AS participant_base_pay, participant.bonus AS participant_bonus, participant.entry_information AS participant_entry_information, participant.status AS participant_status, participant.elt_id AS participant_elt_id, participant.elt_id_max AS participant_elt_id_max, participant.time_credit AS participant_time_credit, participant.estimated_max_time_credit AS participant_estimated_max_time_credit, participant.progress AS participant_progress, participant.time_credit_fixes AS participant_time_credit_fixes, participant.progress_fixes AS participant_progress_fixes, participant.page_uuid AS participant_page_uuid, participant.page_count AS participant_page_count, participant.aborted AS participant_aborted, participant.complete AS participant_complete, participant.answer AS participant_answer, participant.answer_accumulators AS participant_answer_accumulators, participant.sequences AS participant_sequences, participant.branch_log AS participant_branch_log, participant.for_loops AS participant_for_loops, participant.failure_tags AS participant_failure_tags, participant.base_payment AS participant_base_payment, participant.performance_reward AS participant_performance_reward, participant.unpaid_bonus AS participant_unpaid_bonus, participant.total_wait_page_time AS participant_total_wait_page_time, participant.client_ip_address AS participant_client_ip_address, participant.answer_is_fresh AS participant_answer_is_fresh, participant.browser_platform AS participant_browser_platform, participant.module_state_id AS participant_module_state_id, participant.current_trial_id AS participant_current_trial_id, participant.trial_status AS participant_trial_status, participant.awaited_async_code_block_process_id AS participant_awaited_async_code_block_process_id, info_1.id AS info_1_id, info_1.creation_time AS info_1_creation_time, info_1.property1 AS info_1_property1, info_1.property2 AS info_1_property2, info_1.property3 AS info_1_property3, info_1.property4 AS info_1_property4, info_1.property5 AS info_1_property5, info_1.failed AS info_1_failed, info_1.failed_reason AS info_1_failed_reason, info_1.time_of_death AS info_1_time_of_death, info_1.details AS info_1_details, info_1.type AS info_1_type, info_1.origin_id AS info_1_origin_id, info_1.network_id AS info_1_network_id, info_1.contents AS info_1_contents, info_1.complete AS info_1_complete, info_1.node_id AS info_1_node_id, info_1.participant_id AS info_1_participant_id, info_1.module_state_id AS info_1_module_state_id, info_1.trial_maker_id AS info_1_trial_maker_id, info_1.definition AS info_1_definition, info_1.finalized AS info_1_finalized, info_1.is_repeat_trial AS info_1_is_repeat_trial, info_1.score AS info_1_score, info_1.performance_reward AS info_1_performance_reward, info_1.parent_trial_id AS info_1_parent_trial_id, info_1.answer AS info_1_answer, info_1.propagate_failure AS info_1_propagate_failure, info_1.response_id AS info_1_response_id, info_1.repeat_trial_index AS info_1_repeat_trial_index, info_1.n_repeat_trials AS info_1_n_repeat_trials, info_1.time_taken AS info_1_time_taken, info_1.time_credit_before_trial AS info_1_time_credit_before_trial, info_1.time_credit_after_trial AS info_1_time_credit_after_trial, info_1.time_credit_from_trial AS info_1_time_credit_from_trial, info_1.progress_before_trial AS info_1_progress_before_trial, info_1.progress_after_trial AS info_1_progress_after_trial, info_1.async_post_trial_required AS info_1_async_post_trial_required, info_1.async_post_trial_requested AS info_1_async_post_trial_requested, info_1.async_post_trial_complete AS info_1_async_post_trial_complete, info_1.async_post_trial_failed AS info_1_async_post_trial_failed FROM participant LEFT OUTER JOIN info AS info_1 ON info_1.id = participant.current_trial_id AND info_1.type IN (%(type_1_1)s, %(type_1_2)s, %(type_1_3)s, %(type_1_4)s, %(type_1_5)s) WHERE participant.unique_id = %(unique_id_1)s AND participant.type IN (%(type_2_1)s, %(type_2_2)s)
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:3281 in get_participant_from_unique_id (24)
87 | 26.59 | 0.31 | 1.73 | 0.72 | select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s
    select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where pg_catalog.pg_table_is_visible(c.oid) and relname=%(name)s
Callsites /home/frank/projects/PsyNet/psynet/data.py:567 in drop_all_db_tables (58) /home/frank/projects/PsyNet/.venv-psynet-3.13/lib/python3.13/site-packages/dallinger/db.py:162 in init_db (29)
28 | 25.56 | 0.91 | 1.39 | 0.69 | SELECT t.typname as "name", -- no enum defaults in 8.4 at least -- t.typdefault as "default", pg_catalog.pg_type_is_visible(t.oid) as "visible", n.nspname as "schema", e.enumlabel as "label" FROM p...
    SELECT t.typname as "name", -- no enum defaults in 8.4 at least -- t.typdefault as "default", pg_catalog.pg_type_is_visible(t.oid) as "visible", n.nspname as "schema", e.enumlabel as "label" FROM pg_catalog.pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace LEFT JOIN pg_catalog.pg_enum e ON t.oid = e.enumtypid WHERE t.typtype = 'e' ORDER BY "schema", "name", e.oid
Callsites /home/frank/projects/PsyNet/psynet/data.py:791 in ingest_to_model (28)
1 | 25.44 | 25.44 | 25.44 | 0.69 | SELECT network.id AS network_id, network.creation_time AS network_creation_time, network.property1 AS network_property1, network.property2 AS network_property2, network.property3 AS network_propert...
    SELECT network.id AS network_id, network.creation_time AS network_creation_time, network.property1 AS network_property1, network.property2 AS network_property2, network.property3 AS network_property3, network.property4 AS network_property4, network.property5 AS network_property5, network.failed AS network_failed, network.failed_reason AS network_failed_reason, network.time_of_death AS network_time_of_death, network.details AS network_details, network.type AS network_type, network.max_size AS network_max_size, network."full" AS network_full, network.role AS network_role, (SELECT count(info.id) AS count_1 FROM info WHERE info.network_id = network.id AND NOT info.failed AND NOT info.complete) AS anon_1, (SELECT count(info.id) AS count_2 FROM info WHERE info.network_id = network.id AND NOT info.failed AND info.complete) AS anon_2, (SELECT count(info.id) AS count_3 FROM info WHERE info.network_id = network.id AND info.failed) AS anon_3, (SELECT count(node.id) AS count_4 FROM node WHERE node.network_id = network.id AND NOT node.failed) AS anon_4, (SELECT count(node.id) AS count_5 FROM node WHERE node.network_id = network.id AND node.failed) AS anon_5 FROM network
Callsites /home/frank/projects/PsyNet/.venv-psynet-3.13/lib/python3.13/site-packages/dallinger/experiment.py:596 in networks (1)
28 | 23.17 | 0.83 | 1.72 | 0.63 | SELECT t.typname as "name", pg_catalog.format_type(t.typbasetype, t.typtypmod) as "attype", not t.typnotnull as "nullable", t.typdefault as "default", pg_catalog.pg_type_is_visible(t.oid) as "visib...
    SELECT t.typname as "name", pg_catalog.format_type(t.typbasetype, t.typtypmod) as "attype", not t.typnotnull as "nullable", t.typdefault as "default", pg_catalog.pg_type_is_visible(t.oid) as "visible", n.nspname as "schema" FROM pg_catalog.pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace WHERE t.typtype = 'd'
Callsites /home/frank/projects/PsyNet/psynet/data.py:791 in ingest_to_model (28)
27 | 22.73 | 0.84 | 4.96 | 0.61 | SELECT experiment.id AS experiment_id, experiment.property1 AS experiment_property1, experiment.property2 AS experiment_property2, experiment.property3 AS experiment_property3, experiment.property4...
    SELECT experiment.id AS experiment_id, experiment.property1 AS experiment_property1, experiment.property2 AS experiment_property2, experiment.property3 AS experiment_property3, experiment.property4 AS experiment_property4, experiment.property5 AS experiment_property5, experiment.details AS experiment_details, experiment.type AS experiment_type FROM experiment WHERE experiment.id = %(pk_1)s
Callsites /home/frank/projects/PsyNet/psynet/experiment.py:1851 in experiment_config (27)
34 | 21.73 | 0.64 | 2.07 | 0.59 | SELECT asset_module_state.creation_time AS asset_module_state_creation_time, asset_module_state.property1 AS asset_module_state_property1, asset_module_state.property2 AS asset_module_state_propert...
    SELECT asset_module_state.creation_time AS asset_module_state_creation_time, asset_module_state.property1 AS asset_module_state_property1, asset_module_state.property2 AS asset_module_state_property2, asset_module_state.property3 AS asset_module_state_property3, asset_module_state.property4 AS asset_module_state_property4, asset_module_state.property5 AS asset_module_state_property5, asset_module_state.details AS asset_module_state_details, asset_module_state.local_key AS asset_module_state_local_key, asset_module_state.module_state_id AS asset_module_state_module_state_id, asset_module_state.asset_id AS asset_module_state_asset_id, asset_module_state.type AS asset_module_state_type FROM asset_module_state WHERE %(param_1)s = asset_module_state.module_state_id
Callsites /home/frank/projects/PsyNet/psynet/utils.py:149 in call_function_with_context (34)
1 | 21.39 | 21.39 | 21.39 | 0.58 | CREATE TABLE participant ( id SERIAL NOT NULL, creation_time TIMESTAMP WITHOUT TIME ZONE NOT NULL, property1 TEXT, property2 TEXT, property3 TEXT, property4 TEXT, property5 TEXT, failed BOOLEAN NOT...
    CREATE TABLE participant ( id SERIAL NOT NULL, creation_time TIMESTAMP WITHOUT TIME ZONE NOT NULL, property1 TEXT, property2 TEXT, property3 TEXT, property4 TEXT, property5 TEXT, failed BOOLEAN NOT NULL, failed_reason TEXT, time_of_death TIMESTAMP WITHOUT TIME ZONE, details JSONB DEFAULT '{}' NOT NULL, type VARCHAR, fingerprint_hash VARCHAR(50), recruiter_id VARCHAR(50), worker_id VARCHAR(50) NOT NULL, assignment_id VARCHAR(50) NOT NULL, unique_id VARCHAR(150) NOT NULL, hit_id VARCHAR(50) NOT NULL, mode VARCHAR(50) NOT NULL, end_time TIMESTAMP WITHOUT TIME ZONE, base_pay FLOAT, bonus FLOAT, entry_information JSONB DEFAULT '{}' NOT NULL, status participant_status NOT NULL, elt_id VARCHAR, elt_id_max VARCHAR, time_credit FLOAT, estimated_max_time_credit FLOAT, progress FLOAT, time_credit_fixes VARCHAR, progress_fixes VARCHAR, page_uuid VARCHAR, page_count INTEGER, aborted BOOLEAN, complete BOOLEAN, answer VARCHAR, answer_accumulators VARCHAR, sequences VARCHAR, branch_log VARCHAR, for_loops VARCHAR, failure_tags VARCHAR, base_payment FLOAT, performance_reward FLOAT, unpaid_bonus FLOAT, total_wait_page_time FLOAT, client_ip_address VARCHAR, answer_is_fresh BOOLEAN, browser_platform VARCHAR, module_state_id INTEGER, current_trial_id INTEGER, trial_status VARCHAR, awaited_async_code_block_process_id INTEGER, vars VARCHAR DEFAULT '{}', PRIMARY KEY (id), UNIQUE (worker_id), UNIQUE (unique_id) )
Callsites /home/frank/projects/PsyNet/.venv-psynet-3.13/lib/python3.13/site-packages/dallinger/db.py:162 in init_db (1)
3 | 21.15 | 7.05 | 12.44 | 0.57 | SELECT DISTINCT participant.type AS participant_type FROM participant
    SELECT DISTINCT participant.type AS participant_type FROM participant
Callsites /home/frank/projects/PsyNet/.venv-psynet-3.13/lib/python3.13/site-packages/dallinger/db.py:190 in get_all_mapped_classes (3)

## Commits

Total commits: 205; total time: 629.56 ms

Count | Total ms | Mean ms | Max ms | Callsite | Types
--- | --- | --- | --- | --- | ---
47 | 347.28 | 7.39 | 17.09 | /home/frank/projects/PsyNet/psynet/experiment.py:872 in after_request | insert=47
74 | 223.30 | 3.02 | 66.84 | /home/frank/projects/PsyNet/psynet/db.py:25 in transaction | insert+update=8, no-op=61, update=5
28 | 9.44 | 0.34 | 3.05 | /home/frank/projects/PsyNet/psynet/data.py:623 in disable_foreign_key_constraints | no-op=28
28 | 8.05 | 0.29 | 1.60 | /home/frank/projects/PsyNet/psynet/data.py:613 in disable_foreign_key_constraints | no-op=28
1 | 7.53 | 7.53 | 7.53 | /home/frank/projects/PsyNet/psynet/asset.py:3479 in prepare_assets_for_deployment | insert=1
1 | 6.92 | 6.92 | 6.92 | /home/frank/projects/PsyNet/psynet/experiment.py:805 in on_launch | insert=1
1 | 6.05 | 6.05 | 6.05 | /home/frank/projects/PsyNet/psynet/process.py:276 in call_function | update=1
1 | 6.00 | 6.00 | 6.00 | /home/frank/projects/PsyNet/psynet/experiment.py:1890 in setup_experiment_config | insert=1
1 | 4.61 | 4.61 | 4.61 | /home/frank/projects/PsyNet/psynet/experiment.py:2093 in setup_experiment_variables | update=1
1 | 4.10 | 4.10 | 4.10 | /home/frank/projects/PsyNet/psynet/process.py:251 in call_function | update=1
2 | 1.44 | 0.72 | 1.19 | /home/frank/projects/PsyNet/psynet/data.py:539 in drop_all_db_tables | no-op=2
3 | 0.84 | 0.28 | 0.59 | /home/frank/projects/PsyNet/psynet/timeline.py:2601 in nodes_register_in_db | no-op=3
1 | 0.81 | 0.81 | 0.81 | /home/frank/projects/PsyNet/.venv-psynet-3.13/lib/python3.13/site-packages/dallinger/experiment.py:581 in setup | no-op=1
1 | 0.46 | 0.46 | 0.46 | /home/frank/projects/PsyNet/psynet/experiment.py:1296 in _nodes_on_deploy | no-op=1
1 | 0.44 | 0.44 | 0.44 | /home/frank/projects/PsyNet/psynet/experiment.py:1303 in _nodes_on_deploy | no-op=1
1 | 0.43 | 0.43 | 0.43 | /home/frank/projects/PsyNet/psynet/command_line.py:718 in _debug_legacy | no-op=1
3 | 0.42 | 0.14 | 0.15 | /home/frank/projects/PsyNet/psynet/timeline.py:2604 in nodes_register_in_db | no-op=3
3 | 0.37 | 0.12 | 0.14 | /home/frank/projects/PsyNet/psynet/timeline.py:2544 in prepare_assets_for_deployment | no-op=3
3 | 0.37 | 0.12 | 0.13 | /home/frank/projects/PsyNet/psynet/timeline.py:2609 in nodes_stage_assets | no-op=3
1 | 0.23 | 0.23 | 0.23 | /home/frank/projects/PsyNet/psynet/command_line.py:193 in _prepare | no-op=1