--DISPLAY
function()
    time = GetTime() - starttime
    local mastery_ppm = celestial_map_mastery / (time / 60)
    local haste_ppm = celestial_map_haste / (time / 60)
    local crit_ppm = celestial_map_crit / (time / 60)
    local map_ppm = celestial_map_procs / (time / 60)
    
    local mastery_ppm = math.floor(mastery_ppm * 100) / 100
    local haste_ppm = math.floor(haste_ppm * 100) / 100
    local crit_ppm = math.floor(crit_ppm * 100) / 100
    local map_ppm = math.floor(map_ppm * 100) / 100
    return celestial_map_mastery .. "    " .. mastery_ppm .. "     mastery" .. "\n" .. celestial_map_haste .. "    " .. haste_ppm .. "     haste" .. "\n" .. celestial_map_crit .. "    " .. crit_ppm .. "     crit" .. "\n" .. celestial_map_procs .. "    " .. map_ppm .. "     total"
end

--COMBAT_LOG_EVENT_UNFILTERED
function(_, _, subEvent, _, _, sourceName, _, _, _, _, _, _, ...)
    if subEvent == "SPELL_AURA_APPLIED" and sourceName == UnitName("player") then
        local spellId = select(1, ...)
        if spellId == 225752 then
            celestial_map_mastery = celestial_map_mastery + 1
        end
        if spellId == 225753 then
            celestial_map_haste = celestial_map_haste + 1
        end
        if spellId == 225749 then
            celestial_map_crit = celestial_map_crit + 1
        end
        if spellId == 225752 or spellId == 225753 or spellId == 225749 then
            celestial_map_procs = celestial_map_procs + 1
        end
    end
end
