Created
April 1, 2023 11:19
-
-
Save pncnmnp/e94e873d168ec7f84cd09cc878aca40a to your computer and use it in GitHub Desktop.
Vim syntax file for Fio (Flexible I/O Tester)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file for Fio (Flexible I/O Tester) | |
" Language: Fio | |
" Maintainer: Parth Parikh <parthparikh1999p@gmail.com> | |
" Last Change: 2023-04-01 | |
" This code is licensed under Vim License: | |
" https://github.com/vim/vim/blob/master/LICENSE | |
" Fio files are a type of classic INI files | |
" This is a slight modification of: | |
" https://github.com/vim/vim/blob/master/runtime/syntax/dosini.vim | |
" The main difference is that only the default parameters are highlighted | |
" This should help you distinguish your custom parameters with default ones | |
" REMEMBER to add: `au BufRead,BufNewFile *.fio set filetype=fio` | |
" In your .vimrc file | |
" Use fio filetype for *.fio files | |
au BufRead,BufNewFile *.fio set filetype=fio | |
" Define syntax highlighting groups | |
" Match keywords | |
" Units | |
syntax keyword fioKeyword kb_base unit_base | |
" Job description | |
syntax keyword fioKeyword name description loops numjobs | |
" Time related parameters | |
syntax keyword fioKeyword runtime time_based startdelay ramp_time clocksource gtod_reduce gtod_cpu | |
" Target file/device | |
syntax keyword fioKeyword directory filename filename_format unique_filename opendir lockfile nrfiles openfiles file_service_type ioscheduler create_serialize create_fsync create_on_open create_only allow_file_create allow_mounted_write pre_read unlink unlink_each_loop zonemode zonerange zonesize zonecapacity zoneskip read_beyond_wp max_open_zones job_max_open_zones ignore_zone_limits zone_reset_threshold zone_reset_frequency | |
" I/O type | |
syntax keyword fioKeyword direct buffered readwrite rw rw_sequencer unified_rw_reporting randrepeat allrandrepeat randseed fallocate fadvise_hint write_hint offset offset_align offset_increment number_ios fsync fdatasync write_barrier sync_file_range overwrite end_fsync fsync_on_close rwmixread rwmixwrite random_distribution percentage_random norandommap softrandommap random_generator | |
" Block size | |
syntax keyword fioKeyword blocksize bs blocksize_range bssplit blocksize_unaligned bs_unaligned bs_is_seq_rand blockalign | |
" Buffers and memory | |
syntax keyword fioKeyword zero_buffers refill_buffers scramble_buffers buffer_compress_percentage buffer_compress_chunk buffer_pattern dedupe_percentage dedupe_mode dedupe_working_set_percentage dedupe_global invalidate sync iomem mem iomem_align mem_align hugepage-size lockmem | |
" I/O size | |
syntax keyword fioKeyword size io_size io_limit filesize file_append fill_device fill_fs | |
" I/O engine | |
syntax keyword fioKeyword ioengine | |
" I/O engine specific parameters | |
syntax keyword fioKeyword cmdprio_percentage cmdprio_class cmdprio cmdprio_bssplit fixedbufs nonvectored force_async registerfiles sqthread_poll sqthread_poll_cpu cmd_type hipri userspace_reap hipri_percentage nowait fdp fdp_pli cpuload cpuchunks cpumode exit_on_io_done namenode port hostname serverip direct_write_to_pmem busy_wait_polling interface ttl nodelay protocol proto listen pingpong window_size mss donorname inplace clustername rbdname clientname conf busy_poll touch_objects pool cont chunk_size object_class skip_bad hdfsdirectory verb bindname stat_type readfua writefua sg_write_mode stream_id http_host http_user http_pass https http_mode http_s3_region http_s3_key http_s3_keyid http_s3_sse_customer_key http_s3_sse_customer_algorithm http_s3_storage_class http_swift_auth_token http_verbose uri gpu_dev_ids cuda_io nfs_url program arguments grace_time std_redirect xnvme_async xnvme_sync xnvme_admin xnvme_dev_nsid xnvme_dev_subnqn xnvme_mem xnvme_iovec libblkio_driver libblkio_path libblkio_pre_connect_props libblkio_num_entries libblkio_queue_size libblkio_pre_start_props libblkio_vectored libblkio_write_zeroes_on_trim libblkio_wait_mode libblkio_force_enable_completion_eventfd | |
" I/O depth | |
syntax keyword fioKeyword iodepth iodepth_batch_submit iodepth_batch iodepth_batch_complete_min iodepth_batch_complete iodepth_batch_complete_max iodepth_low serialize_overlap io_submit_mode | |
" I/O rate | |
syntax keyword fioKeyword thinktime thinktime_spin thinktime_blocks thinktime_blocks_type thinktime_iotime rate rate_min rate_iops rate_iops_min rate_process rate_ignore_thinktime | |
" I/O latency | |
syntax keyword fioKeyword latency_target latency_window latency_percentile latency_run max_latency rate_cycle | |
" I/O replay | |
syntax keyword fioKeyword write_iolog read_iolog read_iolog_chunked merge_blktrace_file merge_blktrace_scalars replay_no_stall replay_time_scale replay_redirect replay_align replay_scale replay_skip | |
" Threads, processes and job synchronization | |
syntax keyword fioKeyword thread wait_for nice prio prioclass cpus_allowed cpus_allowed_policy cpumask numa_cpu_nodes numa_mem_policy cgroup cgroup_weight cgroup_nodelete flow_id flow flow_sleep stonewall wait_for_previous exitall exit_what exec_prerun exec_postrun uid gid | |
" Verification | |
syntax keyword fioKeyword verify_only do_verify verify verify_offset verify_interval verify_pattern verify_fatal verify_dump verify_async verify_async_cpus verify_backlog verify_backlog_batch verify_state_save verify_state_load trim_percentage trim_verify_zero trim_backlog trim_backlog_batch experimental_verify | |
" Steady state | |
syntax keyword fioKeyword steadystate ss steadystate_duration ss_dur steadystate_ramp_time ss_ramp | |
" Measurements and reporting | |
syntax keyword fioKeyword per_job_logs group_reporting new_group stats write_bw_log write_lat_log write_hist_log write_iops_log log_entries log_avg_msec log_hist_msec log_hist_coarseness log_max_value log_offset log_compression log_compression_cpus log_store_compressed log_unix_epoch log_alternate_epoch log_alternate_epoch_clock_id block_error_percentiles bwavgtime iopsavgtime disk_util disable_lat disable_clat disable_slat disable_bw_measurement disable_bw slat_percentiles clat_percentiles lat_percentiles percentile_list significant_figures | |
" Error handling | |
syntax keyword fioKeyword exitall_on_error continue_on_error ignore_error error_dump | |
" Running predefined workloads | |
syntax keyword fioKeyword profile device-names load test-duration threads-per-queue read-req-num-512-blocks large-block-op-kbytes prep size block numruns dir threads | |
" Match strings with double or single quotes | |
syntax match fioString "=\zs.*" | |
" Match numbers | |
syntax match fioNumber "=\zs\s*\d\+\s*$" | |
syntax match fioNumber "=\zs\s*\d*\.\d\+\s*$" | |
syntax match fioNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" | |
" Match comments starting with # or ; | |
syntax match fioComment "^[#;].*$" | |
" Match delimiters like : , / and - | |
" Match job name like [jobname] | |
syntax region fioFunction start="^\s*\[" end="\]" | |
" Set colors for syntax highlighting groups | |
highlight default link fioKeyword Keyword | |
highlight default link fioNumber Number | |
highlight default link fioString String | |
highlight default link fioComment Comment | |
highlight default link fioFunction Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment